Skip to content

Commit 90d1f59

Browse files
authored
Changes how we treat newtypes, refs #3043
1 parent 87f9f75 commit 90d1f59

File tree

1 file changed

+1
-1
lines changed
  • hypothesis-python/src/hypothesis/strategies/_internal

1 file changed

+1
-1
lines changed

hypothesis-python/src/hypothesis/strategies/_internal/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def try_issubclass(thing, superclass):
9898

9999

100100
def is_a_new_type(thing):
101-
if sys.version_info[:2] < (3, 10):
101+
if not isinstance(thing, type):
102102
# At runtime, `typing.NewType` returns an identity function rather
103103
# than an actual type, but we can check whether that thing matches.
104104
return (

0 commit comments

Comments
 (0)