module documentation
Undocumented
Function | apply |
Apply generic type arguments to a callable type. |
Function | get |
Undocumented |
def apply_generic_arguments(callable:
CallableType
, orig_types: Sequence[ Type|None]
, report_incompatible_typevar_value: Callable[ [ CallableType, Type, str, Context], None]
, context: Context
, skip_unsatisfied: bool
= False, allow_erased_callables: bool
= False) -> CallableType
:
(source)
¶
Apply generic type arguments to a callable type. For example, applying [int] to 'def [T] (T) -> T' results in 'def (int) -> int'. Note that each type can be None; in this case, it will not be applied. If `skip_unsatisfied` is True, then just skip the types that don't satisfy type variable bound or constraints, instead of giving an error.
def get_target_type(tvar:
TypeVarLikeType
, type: Type
, callable: CallableType
, report_incompatible_typevar_value: Callable[ [ CallableType, Type, str, Context], None]
, context: Context
, skip_unsatisfied: bool
) -> Type|None
:
(source)
¶
Undocumented