diff --git a/hypothesis-python/src/hypothesis/strategies/_internal/types.py b/hypothesis-python/src/hypothesis/strategies/_internal/types.py index c949940d8c..7408530707 100644 --- a/hypothesis-python/src/hypothesis/strategies/_internal/types.py +++ b/hypothesis-python/src/hypothesis/strategies/_internal/types.py @@ -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 (