Skip to content

Commit

Permalink
Update src/typing_extensions.py
Browse files Browse the repository at this point in the history
  • Loading branch information
JelleZijlstra committed Mar 11, 2024
1 parent 980eae2 commit 2b4dc3a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/typing_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,8 @@ def _check_generic(cls, parameters, elen=_marker):
num_tv_tuples = sum(isinstance(p, TypeVarTuple) for p in parameters)
if (num_tv_tuples > 0) and (alen >= elen - num_tv_tuples):
return
if sys.version_info >= (3, 10):
word = "arguments"
else:
word = "parameters"
raise TypeError(f"Too {'many' if alen > elen else 'few'} {word} for {cls};"
things = "arguments" if sys.version_info >= (3, 10) else "parameters"
raise TypeError(f"Too {'many' if alen > elen else 'few'} {things} for {cls};"
f" actual {alen}, expected {elen}")


Expand Down

0 comments on commit 2b4dc3a

Please sign in to comment.