MCPcopy
hub / github.com/ormar-orm/ormar / _initialize_internal_attributes

Method _initialize_internal_attributes

ormar/models/newbasemodel.py:470–485  ·  view source on GitHub ↗

Initializes internal attributes during __init__() :rtype: None

(self)

Source from the content-addressed store, hash-verified

468 return new_kwargs, through_tmp_dict
469
470 def _initialize_internal_attributes(self) -> None:
471 """
472 Initializes internal attributes during __init__()
473 :rtype: None
474 """
475 # object.__setattr__(self, "_orm_id", uuid.uuid4().hex)
476 object.__setattr__(self, "_orm_saved", False)
477 object.__setattr__(self, "_pk_column", None)
478 object.__setattr__(self, "__setattr_fields__", set())
479 object.__setattr__(
480 self,
481 "_orm",
482 RelationsManager(
483 related_fields=self.extract_related_fields(), owner=cast("Model", self)
484 ),
485 )
486
487 def __eq__(self, other: object) -> bool:
488 """

Callers 4

__init__Method · 0.95
__setstate__Method · 0.95
_internal_constructMethod · 0.80
model_constructMethod · 0.80

Calls 3

RelationsManagerClass · 0.90
__setattr__Method · 0.45

Tested by

no test coverage detected