From e25ddeedf23c05815c190a4fd008cd97658a2341 Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Fri, 22 Nov 2024 23:18:24 +0100 Subject: [PATCH] fix test, disable UP006 for test file --- pyproject.toml | 1 + tests/test_util.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c30a4f6ad..5af218142 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -166,6 +166,7 @@ ignore = [ [tool.ruff.lint.per-file-ignores] "tests/*.py" = ["D", "S", "E501"] +"tests/test_util.py" = ["D", "S", "E501", "UP006"] "docs/*.py" = ["B"] "docs/examples/*.py" = ["D", "B", "E501"] "src/magicgui/widgets/_image/*.py" = ["D"] diff --git a/tests/test_util.py b/tests/test_util.py index c3bbf8f32..30cf901bc 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -85,7 +85,7 @@ def test_subclass_new_type(self): new_int = typing.NewType("new_int", int) assert safe_issubclass(new_int, new_int) - assert safe_issubclass(list[new_int], list[new_int]) - assert safe_issubclass(list[new_int], list[new_int]) + assert safe_issubclass(list[new_int], typing.List[new_int]) + assert safe_issubclass(typing.List[new_int], list[new_int]) assert safe_issubclass(list[new_int], typing.Sequence[new_int]) assert safe_issubclass(list[new_int], list[new_int])