Skip to content
Next Next commit
Fix subclassing generics
  • Loading branch information
Fidget-Spinner committed Jul 6, 2022
commit c63a4fa7582ceb68978f2c89947f1eaa1dcdfe4a
3 changes: 2 additions & 1 deletion Lib/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,8 @@ def _collect_parameters(args):
if hasattr(t, '__typing_subst__'):
if t not in parameters:
parameters.append(t)
else:
# We need to avoid bare Python types as those aren't really generic.
elif not type(t) is type:
for x in getattr(t, '__parameters__', ()):
if x not in parameters:
parameters.append(x)
Expand Down