Undocumented
Function | scan |
Undocumented |
Function | _scan |
Extract mapping information from an assignment statement in a declarative class. |
Function | _scan |
Extract mapping information from a @declared_attr in a declarative class. |
Function | _scan |
Given a class, iterate through its superclass hierarchy to find all other classes that are considered as ORM-significant. |
Function | _scan |
Extract mapping information from a SymbolTableNode that's in the type.names dictionary. |
ClassDef
, api: SemanticAnalyzerPluginInterface
, is_mixin_scan: bool
= False) -> Optional[ List[ util.SQLAlchemyAttribute]]
:
(source)
¶
Undocumented
ClassDef
, api: SemanticAnalyzerPluginInterface
, stmt: AssignmentStmt
, attributes: List[ util.SQLAlchemyAttribute]
):
(source)
¶
Extract mapping information from an assignment statement in a declarative class.
ClassDef
, api: SemanticAnalyzerPluginInterface
, stmt: Decorator
, attributes: List[ util.SQLAlchemyAttribute]
):
(source)
¶
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]]
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.
ClassDef
, api: SemanticAnalyzerPluginInterface
, name: str
, value: SymbolTableNode
, attributes: List[ util.SQLAlchemyAttribute]
):
(source)
¶
Extract mapping information from a SymbolTableNode that's in the type.names dictionary.