MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / __init__

Method __init__

lib/sqlalchemy/orm/decl_base.py:2037–2060  ·  view source on GitHub ↗
(
        self,
        cls_: Type[_O],
        dict_: _ClassDict,
    )

Source from the content-addressed store, hash-verified

2035 )
2036
2037 def __init__(
2038 self,
2039 cls_: Type[_O],
2040 dict_: _ClassDict,
2041 ):
2042 super().__init__(cls_)
2043 self.clsdict_view = (
2044 util.immutabledict(dict_) if dict_ else util.EMPTY_DICT
2045 )
2046 self.dataclass_setup_arguments = getattr(
2047 self.cls, "_sa_apply_dc_transforms", None
2048 )
2049
2050 self.is_dataclass_prior_to_mapping = dataclasses.is_dataclass(cls_)
2051 self.allow_dataclass_fields = False
2052 self.allow_unmapped_annotations = True
2053 self.collected_attributes = {}
2054 self.collected_annotations = {}
2055
2056 self._scan_attributes()
2057
2058 self._setup_dataclasses_transforms(
2059 enable_descriptor_defaults=False, revert=True
2060 )
2061
2062 def _scan_attributes(self) -> None:
2063 cls = self.cls

Callers

nothing calls this directly

Calls 3

_scan_attributesMethod · 0.95
__init__Method · 0.45

Tested by

no test coverage detected