mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-44794: Merge tests for typing.Callable and collection.abc.Callable (GH-27507)
This commit is contained in:
parent
0ad173249d
commit
be4cb9089a
3 changed files with 141 additions and 117 deletions
|
@ -478,8 +478,7 @@ class _CallableGenericAlias(GenericAlias):
|
|||
# then X[int, str] == X[[int, str]].
|
||||
param_len = len(self.__parameters__)
|
||||
if param_len == 0:
|
||||
raise TypeError(f'There are no type or parameter specification'
|
||||
f'variables left in {self}')
|
||||
raise TypeError(f'{self} is not a generic class')
|
||||
if (param_len == 1
|
||||
and isinstance(item, (tuple, list))
|
||||
and len(item) > 1) or not isinstance(item, tuple):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue