MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _shallow_copy_to

Method _shallow_copy_to

lib/sqlalchemy/sql/traversals.py:164–176  ·  view source on GitHub ↗
(self, other: Self)

Source from the content-addressed store, hash-verified

162 return shallow_to_dict(self)
163
164 def _shallow_copy_to(self, other: Self) -> None:
165 cls = self.__class__
166
167 shallow_copy: Callable[[Self, Self], None]
168 try:
169 shallow_copy = cls.__dict__["_generated_shallow_copy_traversal"]
170 except KeyError:
171 shallow_copy = self._generate_shallow_copy(
172 cls._traverse_internals, "_generated_shallow_copy_traversal"
173 )
174
175 cls._generated_shallow_copy_traversal = shallow_copy # type: ignore # noqa: E501
176 shallow_copy(self, other)
177
178 def _clone(self, **kw: Any) -> Self:
179 """Create a shallow copy"""

Callers 3

_cloneMethod · 0.95
_generateMethod · 0.80
_cloneMethod · 0.80

Calls 1

Tested by

no test coverage detected