Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
NCPlayz committed Oct 31, 2023
1 parent 5c5f430 commit 93a5726
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/typing_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2363,7 +2363,8 @@ def _check_generic(cls, parameters, elen=_marker):
if getattr(parameters[alen], '__default__', None) is not None:
return

num_default_tv = sum(getattr(p, '__default__', None) is not None for p in parameters)
num_default_tv = sum(getattr(p, '__default__', None)
is not None for p in parameters)

elen -= num_default_tv

Expand Down Expand Up @@ -2398,7 +2399,8 @@ def _check_generic(cls, parameters, elen):
if getattr(parameters[alen], '__default__', None) is not None:
return

num_default_tv = sum(getattr(p, '__default__', None) is not None for p in parameters)
num_default_tv = sum(getattr(p, '__default__', None)
is not None for p in parameters)

elen -= num_default_tv

Expand Down Expand Up @@ -2433,7 +2435,7 @@ def _collect_type_vars(types, typevar_types=None):
default_encountered = True
elif default_encountered:
raise TypeError(f'type parameter {t!r} without a default'
' follows type parameter with a default')
' follows type parameter with a default')

tvars.append(t)
if _should_collect_from_parameters(t):
Expand Down Expand Up @@ -2473,7 +2475,6 @@ def _collect_parameters(args):
raise TypeError(f'type parameter {t!r} without a default'
' follows type parameter with a default')


parameters.append(t)
else:
if _should_collect_from_parameters(t):
Expand Down

0 comments on commit 93a5726

Please sign in to comment.