MCPcopy Index your code
hub / github.com/python/cpython / _rebuild_generic_alias

Function _rebuild_generic_alias

Lib/typing.py:433–441  ·  view source on GitHub ↗
(alias: GenericAlias, args: tuple[object, ...])

Source from the content-addressed store, hash-verified

431
432
433def _rebuild_generic_alias(alias: GenericAlias, args: tuple[object, ...]) -> GenericAlias:
434 is_unpacked = alias.__unpacked__
435 if _should_unflatten_callable_args(alias, args):
436 t = alias.__origin__[(args[:-1], args[-1])]
437 else:
438 t = alias.__origin__[args]
439 if is_unpacked:
440 t = Unpack[t]
441 return t
442
443
444def _deprecation_warning_for_no_type_params_passed(funcname: str) -> None:

Callers 2

_eval_typeFunction · 0.85
_strip_annotationsFunction · 0.85

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…