module documentation
Utilities for type argument inference.
Class |
|
Type argument inference context. |
Function | infer |
Infer the type arguments of a generic function. |
Function | infer |
Undocumented |
def infer_function_type_arguments(callee_type:
CallableType
, arg_types: Sequence[ Type|None]
, arg_kinds: list[ ArgKind]
, formal_to_actual: list[ list[ int]]
, context: ArgumentInferContext
, strict: bool
= True) -> list[ Type|None]
:
(source)
¶
Infer the type arguments of a generic function. Return an array of lower bound types for the type variables -1 (at index 0), -2 (at index 1), etc. A lower bound is None if a value could not be inferred. Arguments: callee_type: the target generic function arg_types: argument types at the call site (each optional; if None, we are not considering this argument in the current pass) arg_kinds: nodes.ARG_* values for arg_types formal_to_actual: mapping from formal to actual variable indices