Skip to content

Commit

Permalink
fix generic tuples on py38
Browse files Browse the repository at this point in the history
  • Loading branch information
Zac-HD committed Nov 5, 2023
1 parent a836813 commit 345207a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,11 @@ def from_typing_type(thing):
if len(mapping) > 1:
_Environ = getattr(os, "_Environ", None)
mapping.pop(_Environ, None)
tuple_types = [t for t in mapping if isinstance(t, type) and issubclass(t, tuple)]
tuple_types = [
t
for t in mapping
if (isinstance(t, type) and issubclass(t, tuple)) or t is typing.Tuple
]
if len(mapping) > len(tuple_types):
for tuple_type in tuple_types:
mapping.pop(tuple_type)
Expand Down

0 comments on commit 345207a

Please sign in to comment.