Skip to content

Commit

Permalink
typing.Union handling fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
yoloseem committed Jan 11, 2017
1 parent a4ecf9c commit c7296a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tsukkomi/typed.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def check_type(value: typing.Any, hint: typing.Optional[type]) -> bool:
actual_type, correct = check_callable(value, hint)
elif issubclass(hint, typing.Tuple):
actual_type, correct = check_tuple(value, hint)
elif issubclass(hint, typing.Union):
elif type(hint) is type(typing.Union): # flake8: disable=E721
actual_type, correct = check_union(value, hint)
else:
correct = isinstance(value, hint)
Expand Down

0 comments on commit c7296a8

Please sign in to comment.