From 4f5d2ef74ac16183e80ad43a83056d0f3c5206cb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 7 Apr 2025 21:18:39 +0000 Subject: [PATCH 1/2] ci: [pre-commit.ci] autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/crate-ci/typos: typos-dict-v0.12.4 → v1](https://github.com/crate-ci/typos/compare/typos-dict-v0.12.4...v1) - [github.com/astral-sh/ruff-pre-commit: v0.9.4 → v0.11.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.9.4...v0.11.4) - [github.com/abravalheri/validate-pyproject: v0.23 → v0.24.1](https://github.com/abravalheri/validate-pyproject/compare/v0.23...v0.24.1) - [github.com/pre-commit/mirrors-mypy: v1.14.1 → v1.15.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.14.1...v1.15.0) --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9e1a1b0..104bb21 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,25 +5,25 @@ ci: repos: - repo: https://github.com/crate-ci/typos - rev: typos-dict-v0.12.4 + rev: v1 hooks: - id: typos args: [] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.9.4 + rev: v0.11.4 hooks: - id: ruff args: ["--fix", "--unsafe-fixes"] - id: ruff-format - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.23 + rev: v0.24.1 hooks: - id: validate-pyproject - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.14.1 + rev: v1.15.0 hooks: - id: mypy files: "^src/" From aef887dcf40b955502a821d1ada7adb4980f203b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 7 Apr 2025 21:18:57 +0000 Subject: [PATCH 2/2] style: [pre-commit.ci] auto fixes [...] --- src/app_model/expressions/_expressions.py | 2 +- tests/test_qt/test_qmenu.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app_model/expressions/_expressions.py b/src/app_model/expressions/_expressions.py index c05859a..cba12b0 100644 --- a/src/app_model/expressions/_expressions.py +++ b/src/app_model/expressions/_expressions.py @@ -561,7 +561,7 @@ def visit(self, node: ast.AST) -> ast.AST | None: kwargs[name] = field # return instance of Expr from this module corresponding to the node type - return cast(Expr, globals()[type_](**kwargs)) + return cast("Expr", globals()[type_](**kwargs)) class _ExprSerializer(ast.NodeVisitor): diff --git a/tests/test_qt/test_qmenu.py b/tests/test_qt/test_qmenu.py index aaa591c..359a484 100644 --- a/tests/test_qt/test_qmenu.py +++ b/tests/test_qt/test_qmenu.py @@ -33,12 +33,12 @@ def test_menu( # check that triggering the actions calls the associated commands for cmd in (app.Commands.UNDO, app.Commands.REDO): - action = cast(QAction, menu.findAction(cmd)) + action = cast("QAction", menu.findAction(cmd)) with qtbot.waitSignal(action.triggered): action.trigger() getattr(app.mocks, cmd).assert_called_once() - redo_action = cast(QAction, menu.findAction(app.Commands.REDO)) + redo_action = cast("QAction", menu.findAction(app.Commands.REDO)) assert redo_action.isVisible() assert redo_action.isEnabled()