From d2b199cbd424f39ddc4d3d93df58b6983fb878f7 Mon Sep 17 00:00:00 2001 From: TomJGooding <101601846+TomJGooding@users.noreply.github.com> Date: Wed, 5 Jun 2024 22:06:11 +0100 Subject: [PATCH 1/4] fix: prefix binding actions with app namespace --- poetry.lock | 10 +++++----- trogon/trogon.py | 10 +++++++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/poetry.lock b/poetry.lock index eca07ec..5e32567 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. [[package]] name = "black" @@ -340,13 +340,13 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] [[package]] name = "textual" -version = "0.54.0" +version = "0.65.1" description = "Modern Text User Interface framework" optional = false python-versions = "<4.0,>=3.8" files = [ - {file = "textual-0.54.0-py3-none-any.whl", hash = "sha256:94aacf28dece20a44f0b94b087e17ff4ac961acd92e12e648f060fe2555b3adc"}, - {file = "textual-0.54.0.tar.gz", hash = "sha256:0cfd134dde5ae49d64dd73bb32a2fb5a86d878d9caeacecaa1d640082f31124e"}, + {file = "textual-0.65.1-py3-none-any.whl", hash = "sha256:12a2a00f9b5675577fffa0f71171be5cdd138c42460b7ee95b3182542ee25aa0"}, + {file = "textual-0.65.1.tar.gz", hash = "sha256:22b05430aa2c7f90adc38fb7458bdde9395ca90960063432ae1273510e35e682"}, ] [package.dependencies] @@ -355,7 +355,7 @@ rich = ">=13.3.3" typing-extensions = ">=4.4.0,<5.0.0" [package.extras] -syntax = ["tree-sitter (>=0.20.1,<0.21.0)", "tree_sitter_languages (>=1.7.0)"] +syntax = ["tree-sitter (>=0.20.1,<0.21.0)", "tree-sitter-languages (==1.10.2)"] [[package]] name = "tomli" diff --git a/trogon/trogon.py b/trogon/trogon.py index 1238747..36b1884 100644 --- a/trogon/trogon.py +++ b/trogon/trogon.py @@ -48,10 +48,14 @@ class CommandBuilder(Screen): BINDINGS = [ Binding(key="ctrl+r", action="close_and_run", description="Close & Run"), Binding( - key="ctrl+t", action="focus_command_tree", description="Focus Command Tree" + key="ctrl+t", + action="app.focus_command_tree", + description="Focus Command Tree", ), - Binding(key="ctrl+o", action="show_command_info", description="Command Info"), - Binding(key="ctrl+s", action="focus('search')", description="Search"), + Binding( + key="ctrl+o", action="app.show_command_info", description="Command Info" + ), + Binding(key="ctrl+s", action="app.focus('search')", description="Search"), Binding(key="f1", action="about", description="About"), ] From ba66b66ac941c7dfd3e6245658dcc5cc0d29ad65 Mon Sep 17 00:00:00 2001 From: Dane Hillard Date: Thu, 19 Sep 2024 21:07:58 -0400 Subject: [PATCH 2/4] Update textualize dependency spec Use the lowest version of textualize for which the prefixed action bindings are compatible, while also bumping the version of textual in poetry.lock to the latest release. --- poetry.lock | 8 ++++---- pyproject.toml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/poetry.lock b/poetry.lock index 5e32567..7e75168 100644 --- a/poetry.lock +++ b/poetry.lock @@ -340,13 +340,13 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] [[package]] name = "textual" -version = "0.65.1" +version = "0.73.0" description = "Modern Text User Interface framework" optional = false python-versions = "<4.0,>=3.8" files = [ - {file = "textual-0.65.1-py3-none-any.whl", hash = "sha256:12a2a00f9b5675577fffa0f71171be5cdd138c42460b7ee95b3182542ee25aa0"}, - {file = "textual-0.65.1.tar.gz", hash = "sha256:22b05430aa2c7f90adc38fb7458bdde9395ca90960063432ae1273510e35e682"}, + {file = "textual-0.73.0-py3-none-any.whl", hash = "sha256:4d93d80d203f7fb7ba51828a546e8777019700d529a1b405ceee313dea2edfc2"}, + {file = "textual-0.73.0.tar.gz", hash = "sha256:ccd1e873370577f557dfdf2b3411f2a4f68b57d4365f9d83a00d084afb15f5a6"}, ] [package.dependencies] @@ -396,4 +396,4 @@ test = ["coverage", "pytest", "pytest-cov"] [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "80dd5d5e5b475771be0bf6a5978de44b04de8bba2bb5d84de5575c16deb29c71" +content-hash = "0efdc14cf1ccf1090951b9387d9161ea066b0f578f7353aea15d4151f9aaa323" diff --git a/pyproject.toml b/pyproject.toml index 6c13591..5973b65 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ classifiers = [ [tool.poetry.dependencies] python = "^3.8" -textual = ">=0.54.0" +textual = ">=0.61.0" click = ">=8.0.0" @@ -36,7 +36,7 @@ click = ">=8.0.0" mypy = "^1.2.0" black = "^23.3.0" pytest = "^7.3.1" -textual = ">=0.54.0" +textual = ">=0.61.0" [build-system] requires = ["poetry-core"] From 469a28546a4323519a3a815872c416094255bea9 Mon Sep 17 00:00:00 2001 From: Dane Hillard Date: Thu, 19 Sep 2024 21:19:10 -0400 Subject: [PATCH 3/4] Bump actions versions to latest --- .github/workflows/ci.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 06c0d25..d313f07 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,20 +20,20 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v3.5.2 + - uses: actions/checkout@v4.1.7 - name: Install and configure Poetry - uses: snok/install-poetry@v1.3.3 + uses: snok/install-poetry@v1.4.1 with: - version: 1.4.2 + version: 1.8.3 virtualenvs-in-project: true - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4.6.0 + uses: actions/setup-python@v5.2.0 with: python-version: ${{ matrix.python-version }} architecture: x64 - name: Load cached venv id: cached-poetry-dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: .venv key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} @@ -43,4 +43,4 @@ jobs: - name: Test with pytest run: | source $VENV - pytest tests \ No newline at end of file + pytest tests From 577fa3b13f9d097daebc9526912f0da146fd0e61 Mon Sep 17 00:00:00 2001 From: Dane Hillard Date: Thu, 19 Sep 2024 21:22:22 -0400 Subject: [PATCH 4/4] Downgrade macos runner See actions/setup-python#825 --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d313f07..c28efc0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,7 +14,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-13, windows-latest] python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] defaults: run: