Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ci:

repos:
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.25
rev: '0.26'
hooks:
- id: validate-pyproject

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

- repo: https://github.com/adhtruong/mirrors-typos
rev: v1.48.0
rev: v1.49.0
hooks:
- id: typos
args: [--force-exclude] # omitting --write-changes

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.16.1
rev: v0.16.4
hooks:
- id: ruff-check
args: ["--fix", "--unsafe-fixes"]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v2.3.0
rev: v2.3.1
hooks:
- id: mypy
files: "^src/"
Expand Down
4 changes: 3 additions & 1 deletion tests/test_magicgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -934,8 +934,10 @@ def test_no_order():

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

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

func()
Expand Down
Loading