Skip to content

Commit fe5069b

Browse files
committed
replace newtype check '#1189 (comment)'
1 parent 7f8b90c commit fe5069b

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

temporalio/converter.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1764,13 +1764,7 @@ def value_to_type(
17641764
elif key_type is type(None):
17651765
key = {"null": None}[key]
17661766

1767-
# Can't call isinstance if key_type is a newtype
1768-
is_newtype = getattr(key_type, "__supertype__", None)
1769-
if (
1770-
is_newtype
1771-
or not isinstance(key_type, type)
1772-
or not isinstance(key, key_type)
1773-
):
1767+
if not isinstance(key_type, type) or not isinstance(key, key_type):
17741768
key = value_to_type(key_type, key, custom_converters)
17751769
except Exception as err:
17761770
raise TypeError(

0 commit comments

Comments
 (0)