Checks if obj matches either a list of types, ``...``, ``ParamSpec`` or ``_ConcatenateGenericAlias`` from typing.py
(obj)
| 514 | return _CallableGenericAlias(Callable, tuple(new_args)) |
| 515 | |
| 516 | def _is_param_expr(obj): |
| 517 | """Checks if obj matches either a list of types, ``...``, ``ParamSpec`` or |
| 518 | ``_ConcatenateGenericAlias`` from typing.py |
| 519 | """ |
| 520 | if obj is Ellipsis: |
| 521 | return True |
| 522 | if isinstance(obj, list): |
| 523 | return True |
| 524 | obj = type(obj) |
| 525 | names = ('ParamSpec', '_ConcatenateGenericAlias') |
| 526 | return obj.__module__ == 'typing' and any(obj.__name__ == name for name in names) |
| 527 | |
| 528 | |
| 529 | class Callable(metaclass=ABCMeta): |
no test coverage detected
searching dependent graphs…