Skip to content

Commit 128e4ba

Browse files
tlambert03claude
andauthored
ci(pre-commit): autoupdate hooks (#744)
* ci(pre-commit): autoupdate hooks - validate-pyproject v0.25 -> 0.26 - typos v1.48.0 -> v1.49.0 - ruff v0.16.1 -> v0.16.4 - mypy v2.3.0 -> v2.3.1 Applies the new RUF036 fix in `_concrete.py`, and noqa's it in `test_no_order`, where the reversed `Union[None, int]` is the point of the test. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * test: explain the RUF036 noqa in test_no_order Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent b862357 commit 128e4ba

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ci:
55

66
repos:
77
- repo: https://github.com/abravalheri/validate-pyproject
8-
rev: v0.25
8+
rev: '0.26'
99
hooks:
1010
- id: validate-pyproject
1111

@@ -16,20 +16,20 @@ repos:
1616
files: "^\\.github/workflows/.*\\.ya?ml$"
1717

1818
- repo: https://github.com/adhtruong/mirrors-typos
19-
rev: v1.48.0
19+
rev: v1.49.0
2020
hooks:
2121
- id: typos
2222
args: [--force-exclude] # omitting --write-changes
2323

2424
- repo: https://github.com/astral-sh/ruff-pre-commit
25-
rev: v0.16.1
25+
rev: v0.16.4
2626
hooks:
2727
- id: ruff-check
2828
args: ["--fix", "--unsafe-fixes"]
2929
- id: ruff-format
3030

3131
- repo: https://github.com/pre-commit/mirrors-mypy
32-
rev: v2.3.0
32+
rev: v2.3.1
3333
hooks:
3434
- id: mypy
3535
files: "^src/"

tests/test_magicgui.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,8 +934,10 @@ def test_no_order():
934934

935935
register_type(Union[int, None], return_callback=mock)
936936

937+
# registration above used Union[int, None]; annotating with the reversed
938+
# order is the whole point of this test, so RUF036 must not "fix" it
937939
@magicgui
938-
def func() -> Union[int, None]:
940+
def func() -> Union[None, int]: # noqa: RUF036
939941
return 1
940942

941943
func()

0 commit comments

Comments
 (0)