class SemanticAnalyzerInterface(SemanticAnalyzerCoreInterface): (source)
Known subclasses: mypy.semanal.SemanticAnalyzer
A limited abstract interface to some generic semantic analyzer pass 2 functionality. We use this interface for various reasons: * Looser coupling * Cleaner import graph * Less need to pass around callback functions
Method | accept |
Undocumented |
Method | add |
Add symbol to the current symbol table. |
Method | add |
Add symbol to the current symbol table, skipping locals. |
Method | add |
Add node to the current symbol table. |
Method | anal |
Undocumented |
Method | basic |
Undocumented |
Method | current |
Get currently active symbol table. |
Method | get |
Undocumented |
Method | lookup |
Undocumented |
Method | named |
Undocumented |
Method | named |
Undocumented |
Method | parse |
Undocumented |
Method | process |
Undocumented |
Method | qualified |
Undocumented |
Method | schedule |
Undocumented |
Class Variable | tvar |
Undocumented |
Property | is |
Undocumented |
Inherited from SemanticAnalyzerCoreInterface
:
Method | defer |
Undocumented |
Method | fail |
Undocumented |
Method | incomplete |
Undocumented |
Method | is |
Undocumented |
Method | is |
Is the specific __future__ feature imported |
Method | is |
Is a module or class namespace potentially missing some definitions? |
Method | lookup |
Undocumented |
Method | lookup |
Undocumented |
Method | lookup |
Undocumented |
Method | note |
Undocumented |
Method | record |
Undocumented |
Property | final |
Is this the final iteration of semantic analysis? |
Property | is |
Undocumented |
Property | type |
Undocumented |
def add_symbol(self, name:
str
, node: SymbolNode
, context: Context
, module_public: bool
= True, module_hidden: bool
= False, can_defer: bool
= True) -> bool
:
(source)
¶
mypy.semanal.SemanticAnalyzer
Add symbol to the current symbol table.
mypy.semanal.SemanticAnalyzer
Add symbol to the current symbol table, skipping locals. This is used to store symbol nodes in a symbol table that is going to be serialized (local namespaces are not serialized). See implementation docstring for more details.
def add_symbol_table_node(self, name:
str
, stnode: SymbolTableNode
) -> bool
:
(source)
¶
mypy.semanal.SemanticAnalyzer
Add node to the current symbol table.
def anal_type(self, t:
Type
, *, tvar_scope: TypeVarLikeScope|None
= None, allow_tuple_literal: bool
= False, allow_unbound_tvars: bool
= False, allow_required: bool
= False, allow_placeholder: bool
= False, report_invalid_types: bool
= True, prohibit_self_type: str|None
= None) -> Type|None
:
(source)
¶
mypy.semanal.SemanticAnalyzer
Undocumented
def basic_new_typeinfo(self, name:
str
, basetype_or_fallback: Instance
, line: int
) -> TypeInfo
:
(source)
¶
mypy.semanal.SemanticAnalyzer
Undocumented
mypy.semanal.SemanticAnalyzer
Get currently active symbol table. May be module, class, or local namespace.
def get_and_bind_all_tvars(self, type_exprs:
list[ Expression]
) -> list[ TypeVarLikeType]
:
(source)
¶
mypy.semanal.SemanticAnalyzer
Undocumented
def lookup(self, name:
str
, ctx: Context
, suppress_errors: bool
= False) -> SymbolTableNode|None
:
(source)
¶
mypy.semanal.SemanticAnalyzer
Undocumented
def named_type(self, fullname:
str
, args: list[ Type]|None
= None) -> Instance
:
(source)
¶
mypy.semanal.SemanticAnalyzer
Undocumented
def named_type_or_none(self, fullname:
str
, args: list[ Type]|None
= None) -> Instance|None
:
(source)
¶
mypy.semanal.SemanticAnalyzer
Undocumented
def process_placeholder(self, name:
str|None
, kind: str
, ctx: Context
, force_progress: bool
= False):
(source)
¶
mypy.semanal.SemanticAnalyzer
Undocumented