Skip to content

Commit

Permalink
Update types.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn authored Jul 27, 2021
1 parent 4ba33aa commit 36633ea
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def try_issubclass(thing, superclass):


def is_a_new_type(thing):
if not isinstance(thing, type):
if not isinstance(typing.NewType, type):
# At runtime, `typing.NewType` returns an identity function rather
# than an actual type, but we can check whether that thing matches.
return (
Expand Down

0 comments on commit 36633ea

Please sign in to comment.