Skip to content

Commit

Permalink
only ignoring type comment for Python version 3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
PatMyron committed Dec 15, 2020
1 parent 8d62c87 commit 23bbc2d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cloudformation_cli_python_lib/recast.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,8 @@ def get_forward_ref_type() -> Any:
# introspection is valid:
# https://docs.python.org/3/library/typing.html#typing.ForwardRef
if "ForwardRef" in dir(typing):
return typing.ForwardRef # type: ignore
if sys.version_info > (3, 6):
return typing.ForwardRef
else:
return typing.ForwardRef # type: ignore
return typing._ForwardRef # type: ignore

0 comments on commit 23bbc2d

Please sign in to comment.