MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / _as_declarative

Function _as_declarative

lib/sqlalchemy/orm/decl_base.py:240–245  ·  view source on GitHub ↗
(
    registry: _RegistryType, cls: Type[Any], dict_: _ClassDict
)

Source from the content-addressed store, hash-verified

238
239
240def _as_declarative(
241 registry: _RegistryType, cls: Type[Any], dict_: _ClassDict
242) -> Optional[_MapperConfig]:
243 # declarative scans the class for attributes. no table or mapper
244 # args passed separately.
245 return _MapperConfig.setup_mapping(registry, cls, dict_, None, {})
246
247
248def _mapper(

Callers 7

as_declarativeFunction · 0.85
__init__Method · 0.85
__init_subclass__Method · 0.85
__init_subclass__Method · 0.85
decorateMethod · 0.85
mappedMethod · 0.85
map_declarativelyMethod · 0.85

Calls 1

setup_mappingMethod · 0.80

Tested by

no test coverage detected