module documentation
(source)

Shared definitions used by different parts of semantic analysis.
Class ​Semantic​Analyzer​Core​Interface A core abstract interface to generic semantic analyzer functionality.
Class ​Semantic​Analyzer​Interface A limited abstract interface to some generic semantic analyzer pass 2 functionality.
Function calculate​_tuple​_fallback Calculate a precise item type for the fallback of a tuple type.
Function create​_indirect​_imported​_name Create symbol table entry for a name imported from another module.
Function set​_callable​_name Undocumented
Constant PRIORITY​_FALLBACKS Undocumented
def calculate_tuple_fallback(typ): (source)

Calculate a precise item type for the fallback of a tuple type.

This must be called only after the main semantic analysis pass, since joins aren't available before that.

Note that there is an apparent chicken and egg problem with respect to verifying type arguments against bounds. Verifying bounds might require fallbacks, but we might use the bounds to calculate the fallbacks. In practice this is not a problem, since the worst that can happen is that we have invalid type argument values, and these can happen in later stages as well (they will generate errors, but we don't prevent their existence).

Parameters
typ:TupleTypeUndocumented
def create_indirect_imported_name(file_node, module, relative, imported_name): (source)

Create symbol table entry for a name imported from another module.

These entries act as indirect references.

Parameters
file​_node:MypyFileUndocumented
module:strUndocumented
relative:intUndocumented
imported​_name:strUndocumented
Returns
Optional[SymbolTableNode]Undocumented
def set_callable_name(sig, fdef): (source)

Undocumented

Parameters
sig:TypeUndocumented
fdef:FuncDefUndocumented
Returns
ProperTypeUndocumented
PRIORITY_FALLBACKS: int = (source)

Undocumented

Value
1