Undocumented
Function | _scan_declarative_assignment_stmt |
Extract mapping information from an assignment statement in a declarative class. |
Function | _scan_declarative_decorator_stmt |
Extract mapping information from a @declared_attr in a declarative class. |
Function | _scan_for_mapped_bases |
Given a class, iterate through its superclass hierarchy to find all other classes that are considered as ORM-significant. |
Function | _scan_symbol_table_entry |
Extract mapping information from a SymbolTableNode that's in the type.names dictionary. |
Function | scan_declarative_assignments_and_apply_types |
Undocumented |
Parameters | |
api:SemanticAnalyzerPluginInterface | Undocumented |
stmt:AssignmentStmt | Undocumented |
attributes:List[ | Undocumented |
Extract mapping information from a @declared_attr in a declarative class.
E.g.:
@reg.mapped class MyClass: # ... @declared_attr def updated_at(cls) -> Column[DateTime]: return Column(DateTime)
Will resolve in mypy as:
@reg.mapped class MyClass: # ... updated_at: Mapped[Optional[datetime.datetime]]
Parameters | |
api:SemanticAnalyzerPluginInterface | Undocumented |
stmt:Decorator | Undocumented |
attributes:List[ | Undocumented |
Given a class, iterate through its superclass hierarchy to find all other classes that are considered as ORM-significant.
Locates non-mapped mixins and scans them for mapped attributes to be applied to subclasses.
Parameters | |
api:SemanticAnalyzerPluginInterface | Undocumented |
Parameters | |
api:SemanticAnalyzerPluginInterface | Undocumented |
name:str | Undocumented |
value:SymbolTableNode | Undocumented |
attributes:List[ | Undocumented |
Undocumented
Parameters | |
api:SemanticAnalyzerPluginInterface | Undocumented |
is_mixin_scan:bool | Undocumented |
Returns | |
Optional[ | Undocumented |