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

Method decorate

lib/sqlalchemy/orm/decl_api.py:1676–1692  ·  view source on GitHub ↗
(cls: Type[_O])

Source from the content-addressed store, hash-verified

1674 """
1675
1676 def decorate(cls: Type[_O]) -> Type[_O]:
1677 setattr(
1678 cls,
1679 "_sa_apply_dc_transforms",
1680 {
1681 "init": init,
1682 "repr": repr,
1683 "eq": eq,
1684 "order": order,
1685 "unsafe_hash": unsafe_hash,
1686 "match_args": match_args,
1687 "kw_only": kw_only,
1688 "dataclass_callable": dataclass_callable,
1689 },
1690 )
1691 _as_declarative(self, cls, cls.__dict__)
1692 return cls
1693
1694 if __cls:
1695 return decorate(__cls)

Callers

nothing calls this directly

Calls 2

generate_baseMethod · 0.95
_as_declarativeFunction · 0.85

Tested by

no test coverage detected