module documentation
(source)

Undocumented

Function apply​_generic​_arguments Apply generic type arguments to a callable type.
Function get​_target​_type Undocumented
def apply_generic_arguments(callable, orig_types, report_incompatible_typevar_value, context, skip_unsatisfied=False): (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.

Parameters
callable:CallableTypeUndocumented
orig​_types:Sequence[Optional[Type]]Undocumented
report​_incompatible​_typevar​_value:Callable[[CallableType, Type, str, Context], None]Undocumented
context:ContextUndocumented
skip​_unsatisfied:boolUndocumented
Returns
CallableTypeUndocumented
def get_target_type(tvar, type, callable, report_incompatible_typevar_value, context, skip_unsatisfied): (source)

Undocumented

Parameters
tvar:TypeVarLikeTypeUndocumented
type:ProperTypeUndocumented
callable:CallableTypeUndocumented
report​_incompatible​_typevar​_value:Callable[[CallableType, Type, str, Context], None]Undocumented
context:ContextUndocumented
skip​_unsatisfied:boolUndocumented
Returns
Optional[Type]Undocumented