Skip to content

Commit 474895e

Browse files
committed
1 parent 8d62c87 commit 474895e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/cloudformation_cli_python_lib/recast.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import sys
12
import typing
23
from typing import Any, Dict, List, Mapping, Set
34

@@ -127,5 +128,8 @@ def get_forward_ref_type() -> Any:
127128
# introspection is valid:
128129
# https://docs.python.org/3/library/typing.html#typing.ForwardRef
129130
if "ForwardRef" in dir(typing):
130-
return typing.ForwardRef # type: ignore
131+
if sys.version_info > (3, 6):
132+
return typing.ForwardRef
133+
else:
134+
return typing.ForwardRef # type: ignore
131135
return typing._ForwardRef # type: ignore

0 commit comments

Comments
 (0)