From 7c206ce48fc242c040012c5a92dd20966db725ec Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Nov 2025 21:54:43 +0000 Subject: [PATCH 1/3] ci: [pre-commit.ci] autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/adhtruong/mirrors-typos: v1.35.8 → v1.39.0](https://github.com/adhtruong/mirrors-typos/compare/v1.35.8...v1.39.0) - [github.com/astral-sh/ruff-pre-commit: v0.12.11 → v0.14.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.11...v0.14.3) - [github.com/pre-commit/mirrors-mypy: v1.17.1 → v1.18.2](https://github.com/pre-commit/mirrors-mypy/compare/v1.17.1...v1.18.2) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 12e51fe..0f8ca82 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,20 +10,20 @@ repos: - id: validate-pyproject - repo: https://github.com/adhtruong/mirrors-typos - rev: v1.35.8 + rev: v1.39.0 hooks: - id: typos args: [--force-exclude] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.11 + rev: v0.14.3 hooks: - id: ruff-check args: ["--fix", "--unsafe-fixes"] - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.17.1 + rev: v1.18.2 hooks: - id: mypy files: "^src/" From ec54a29da34fe423227b8b1062ca4d433eca21ad Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Nov 2025 21:56:29 +0000 Subject: [PATCH 2/3] style: [pre-commit.ci] auto fixes [...] --- demo/qapplication.py | 4 ++-- tests/test_app.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/demo/qapplication.py b/demo/qapplication.py index 236c575..df664b0 100644 --- a/demo/qapplication.py +++ b/demo/qapplication.py @@ -40,7 +40,7 @@ def new_file(self) -> None: def open(self) -> None: if self.maybe_save(): - fileName, filtr = QFileDialog.getOpenFileName(self) + fileName, _filtr = QFileDialog.getOpenFileName(self) if fileName: self.load_file(fileName) @@ -48,7 +48,7 @@ def save(self) -> bool: return self.save_file(self._cur_file) if self._cur_file else self.save_as() def save_as(self) -> bool: - fileName, filtr = QFileDialog.getSaveFileName(self) + fileName, _filtr = QFileDialog.getSaveFileName(self) if fileName: return self.save_file(fileName) diff --git a/tests/test_app.py b/tests/test_app.py index 8f43cfb..bb3c3bd 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -45,7 +45,7 @@ def test_app(full_app: FullApp) -> None: def test_sorting(full_app: FullApp) -> None: groups = list(full_app.menus.iter_menu_groups(full_app.Menus.EDIT)) assert len(groups) == 3 - [g0, g1, g2] = groups + [_g0, g1, g2] = groups assert all(i.group == "1_undo_redo" for i in g1) assert all(i.group == "2_copy_paste" for i in g2) From 26d0ab5d60ad7b2a6dcbe13e8fd21632a329f0bc Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Sun, 9 Nov 2025 12:27:50 -0500 Subject: [PATCH 3/3] fix pre-commit --- .pre-commit-config.yaml | 2 +- tests/test_app.py | 2 +- tests/test_command_registry.py | 4 ++-- tests/test_registries.py | 4 +++- tests/test_types.py | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0f8ca82..23e3f0c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: args: [--force-exclude] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.3 + rev: v0.14.4 hooks: - id: ruff-check args: ["--fix", "--unsafe-fixes"] diff --git a/tests/test_app.py b/tests/test_app.py index bb3c3bd..8da0f3e 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -74,7 +74,7 @@ def test_action_import_by_string(full_app: FullApp) -> None: # tests what happens when the object is not callable cannot be found with pytest.raises( TypeError, - match="Command 'not.callable' did not resolve to a callble object", + match=r"Command 'not\.callable' did not resolve to a callble object", ): full_app.commands.execute_command(full_app.Commands.NOT_CALLABLE) # the second time we try within a session, nothing should happen diff --git a/tests/test_command_registry.py b/tests/test_command_registry.py index 7ef6545..c750725 100644 --- a/tests/test_command_registry.py +++ b/tests/test_command_registry.py @@ -14,10 +14,10 @@ def test_commands_registry() -> None: assert "(1 commands)" in repr(reg) assert id1 in str(reg) assert id1 in reg - with pytest.raises(KeyError, match="my.id2"): + with pytest.raises(KeyError, match=r"my\.id2"): reg["my.id2"] - with pytest.raises(ValueError, match="Command 'my.id' already registered"): + with pytest.raises(ValueError, match=r"Command 'my\.id' already registered"): reg.register_command(id1, lambda: 42, "My Title") assert reg.execute_command(id1, execute_asynchronously=True).result() == 42 diff --git a/tests/test_registries.py b/tests/test_registries.py index a011fa3..37ede1d 100644 --- a/tests/test_registries.py +++ b/tests/test_registries.py @@ -124,7 +124,9 @@ def test_register_action_keybindings_filter(kb: list[dict], msg: str) -> None: ), ], ) -def test_register_action_keybindings_priorization(kb1: str, kb2: str, kb3: str) -> None: +def test_register_action_keybindings_prioritization( + kb1: str, kb2: str, kb3: str +) -> None: """Check `get_context_prioritized_keybinding`.""" reg = KeyBindingsRegistry() diff --git a/tests/test_types.py b/tests/test_types.py index 64fdd41..3df6ad0 100644 --- a/tests/test_types.py +++ b/tests/test_types.py @@ -17,5 +17,5 @@ def test_action_validation() -> None: with pytest.raises(ValidationError): Action(id="test", title="test", callback=[]) - with pytest.raises(ValidationError, match="'x.:asdf' is not a valid"): + with pytest.raises(ValidationError, match=r"'x\.\\:asdf' is not a valid"): Action(id="test", title="test", callback="x.:asdf")