File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ def _no_slots_copy(dct):
28
28
dict_copy .pop (slot , None )
29
29
return dict_copy
30
30
31
+
31
32
def _check_generic (cls , parameters , elen ):
32
33
"""Check correct count for parameters of a generic cls (internal helper).
33
34
This gives a nice error message in case of count mismatch.
@@ -2335,7 +2336,11 @@ def _collect_type_vars(types):
2335
2336
"""
2336
2337
tvars = []
2337
2338
for t in types :
2338
- if isinstance (t , typing .TypeVar ) and t not in tvars and not isinstance (t , _UnpackAlias ):
2339
+ if (
2340
+ isinstance (t , typing .TypeVar )
2341
+ and t not in tvars
2342
+ and not isinstance (t , _UnpackAlias )
2343
+ ):
2339
2344
tvars .append (t )
2340
2345
if isinstance (t , (typing ._GenericAlias , _types .GenericAlias )):
2341
2346
tvars .extend ([t for t in t .__parameters__ if t not in tvars ])
You can’t perform that action at this time.
0 commit comments