diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8187e4a4..e6ebf431 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ ci: repos: - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.25 + rev: '0.26' hooks: - id: validate-pyproject @@ -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/" diff --git a/tests/test_magicgui.py b/tests/test_magicgui.py index 56664b7c..dbbb3345 100644 --- a/tests/test_magicgui.py +++ b/tests/test_magicgui.py @@ -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()