Skip to content

Commit 6a228ea

Browse files
ci: [pre-commit.ci] autoupdate (#264)
* ci: [pre-commit.ci] autoupdate updates: - [github.com/adhtruong/mirrors-typos: v1.35.8 → v1.39.0](adhtruong/mirrors-typos@v1.35.8...v1.39.0) - [github.com/astral-sh/ruff-pre-commit: v0.12.11 → v0.14.3](astral-sh/ruff-pre-commit@v0.12.11...v0.14.3) - [github.com/pre-commit/mirrors-mypy: v1.17.1 → v1.18.2](pre-commit/mirrors-mypy@v1.17.1...v1.18.2) * style: [pre-commit.ci] auto fixes [...] * fix pre-commit --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Talley Lambert <[email protected]>
1 parent b3ecded commit 6a228ea

File tree

6 files changed

+13
-11
lines changed

6 files changed

+13
-11
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ repos:
1010
- id: validate-pyproject
1111

1212
- repo: https://github.com/adhtruong/mirrors-typos
13-
rev: v1.35.8
13+
rev: v1.39.0
1414
hooks:
1515
- id: typos
1616
args: [--force-exclude]
1717

1818
- repo: https://github.com/astral-sh/ruff-pre-commit
19-
rev: v0.12.11
19+
rev: v0.14.4
2020
hooks:
2121
- id: ruff-check
2222
args: ["--fix", "--unsafe-fixes"]
2323
- id: ruff-format
2424

2525
- repo: https://github.com/pre-commit/mirrors-mypy
26-
rev: v1.17.1
26+
rev: v1.18.2
2727
hooks:
2828
- id: mypy
2929
files: "^src/"

demo/qapplication.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ def new_file(self) -> None:
4040

4141
def open(self) -> None:
4242
if self.maybe_save():
43-
fileName, filtr = QFileDialog.getOpenFileName(self)
43+
fileName, _filtr = QFileDialog.getOpenFileName(self)
4444
if fileName:
4545
self.load_file(fileName)
4646

4747
def save(self) -> bool:
4848
return self.save_file(self._cur_file) if self._cur_file else self.save_as()
4949

5050
def save_as(self) -> bool:
51-
fileName, filtr = QFileDialog.getSaveFileName(self)
51+
fileName, _filtr = QFileDialog.getSaveFileName(self)
5252
if fileName:
5353
return self.save_file(fileName)
5454

tests/test_app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def test_app(full_app: FullApp) -> None:
4545
def test_sorting(full_app: FullApp) -> None:
4646
groups = list(full_app.menus.iter_menu_groups(full_app.Menus.EDIT))
4747
assert len(groups) == 3
48-
[g0, g1, g2] = groups
48+
[_g0, g1, g2] = groups
4949
assert all(i.group == "1_undo_redo" for i in g1)
5050
assert all(i.group == "2_copy_paste" for i in g2)
5151

@@ -74,7 +74,7 @@ def test_action_import_by_string(full_app: FullApp) -> None:
7474
# tests what happens when the object is not callable cannot be found
7575
with pytest.raises(
7676
TypeError,
77-
match="Command 'not.callable' did not resolve to a callble object",
77+
match=r"Command 'not\.callable' did not resolve to a callble object",
7878
):
7979
full_app.commands.execute_command(full_app.Commands.NOT_CALLABLE)
8080
# the second time we try within a session, nothing should happen

tests/test_command_registry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ def test_commands_registry() -> None:
1414
assert "(1 commands)" in repr(reg)
1515
assert id1 in str(reg)
1616
assert id1 in reg
17-
with pytest.raises(KeyError, match="my.id2"):
17+
with pytest.raises(KeyError, match=r"my\.id2"):
1818
reg["my.id2"]
1919

20-
with pytest.raises(ValueError, match="Command 'my.id' already registered"):
20+
with pytest.raises(ValueError, match=r"Command 'my\.id' already registered"):
2121
reg.register_command(id1, lambda: 42, "My Title")
2222

2323
assert reg.execute_command(id1, execute_asynchronously=True).result() == 42

tests/test_registries.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ def test_register_action_keybindings_filter(kb: list[dict], msg: str) -> None:
124124
),
125125
],
126126
)
127-
def test_register_action_keybindings_priorization(kb1: str, kb2: str, kb3: str) -> None:
127+
def test_register_action_keybindings_prioritization(
128+
kb1: str, kb2: str, kb3: str
129+
) -> None:
128130
"""Check `get_context_prioritized_keybinding`."""
129131
reg = KeyBindingsRegistry()
130132

tests/test_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ def test_action_validation() -> None:
1717
with pytest.raises(ValidationError):
1818
Action(id="test", title="test", callback=[])
1919

20-
with pytest.raises(ValidationError, match="'x.<locals>:asdf' is not a valid"):
20+
with pytest.raises(ValidationError, match=r"'x\.\<locals\>\:asdf' is not a valid"):
2121
Action(id="test", title="test", callback="x.<locals>:asdf")

0 commit comments

Comments
 (0)