Skip to content

Commit

Permalink
more lint
Browse files Browse the repository at this point in the history
  • Loading branch information
JelleZijlstra committed Dec 1, 2021
1 parent 7fcea86 commit be56a0a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion typing_extensions/src/typing_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def _no_slots_copy(dct):
dict_copy.pop(slot, None)
return dict_copy


def _check_generic(cls, parameters, elen):
"""Check correct count for parameters of a generic cls (internal helper).
This gives a nice error message in case of count mismatch.
Expand Down Expand Up @@ -2335,7 +2336,11 @@ def _collect_type_vars(types):
"""
tvars = []
for t in types:
if isinstance(t, typing.TypeVar) and t not in tvars and not isinstance(t, _UnpackAlias):
if (
isinstance(t, typing.TypeVar)
and t not in tvars
and not isinstance(t, _UnpackAlias)
):
tvars.append(t)
if isinstance(t, (typing._GenericAlias, _types.GenericAlias)):
tvars.extend([t for t in t.__parameters__ if t not in tvars])
Expand Down

0 comments on commit be56a0a

Please sign in to comment.