Skip to content

Commit

Permalink
Fix for Python3.6 (typing.Type)
Browse files Browse the repository at this point in the history
  • Loading branch information
erezsh committed Jun 22, 2022
1 parent f3a3725 commit b59c0a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtype/pytypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def _cast_to_type(t):
x ,= t.__args__
return Sequence[_cast_to_type(x)]

elif t.__origin__ is type:
elif t.__origin__ is type or t.__origin__ is typing.Type:
# TODO test issubclass on t.__args__
return PythonDataType(type)

Expand Down

0 comments on commit b59c0a0

Please sign in to comment.