summaryrefslogtreecommitdiff
path: root/tests/test_util_typing.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_util_typing.py')
-rw-r--r--tests/test_util_typing.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/test_util_typing.py b/tests/test_util_typing.py
index 354db1567..73b4aca53 100644
--- a/tests/test_util_typing.py
+++ b/tests/test_util_typing.py
@@ -10,8 +10,7 @@
import sys
from numbers import Integral
-from typing import (Any, Callable, Dict, Generator, Generic, List, Optional, Tuple, TypeVar,
- Union)
+from typing import Any, Callable, Dict, Generator, List, Optional, Tuple, TypeVar, Union
import pytest
@@ -25,8 +24,10 @@ class MyClass1:
class MyClass2(MyClass1):
__qualname__ = '<MyClass2>'
+
T = TypeVar('T')
+
class MyList(List[T]):
pass
@@ -132,8 +133,8 @@ def test_stringify_type_hints_containers():
@pytest.mark.skipif(sys.version_info < (3, 9), reason='python 3.9+ is required.')
def test_stringify_Annotated():
- from typing import Annotated
- assert stringify(Annotated[str, "foo", "bar"]) == "str"
+ from typing import Annotated # type: ignore
+ assert stringify(Annotated[str, "foo", "bar"]) == "str" # NOQA
def test_stringify_type_hints_string():