Skip to content

Commit 91a2ffc

Browse files
committed
fix typing tests with 3.6
1 parent 4d17a4c commit 91a2ffc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/test_typing.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import sys
22
from collections import namedtuple
3-
from typing import Any, Callable as TypingCallable, Dict, ForwardRef, List, NamedTuple, NewType, Union # noqa: F401
3+
from typing import Any, Callable as TypingCallable, Dict, List, NamedTuple, NewType, Union # noqa: F401
44

55
import pytest
66
from typing_extensions import Annotated # noqa: F401
@@ -24,6 +24,12 @@
2424
except ImportError:
2525
mypy_extensions_TypedDict = None
2626

27+
try:
28+
from typing import ForwardRef
29+
except ImportError:
30+
# ForwardRef is only available in Python 3.6+
31+
pass
32+
2733
ALL_TYPEDDICT_KINDS = (typing_TypedDict, typing_extensions_TypedDict, mypy_extensions_TypedDict)
2834

2935

0 commit comments

Comments
 (0)