MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _annotate

Method _annotate

lib/sqlalchemy/sql/annotation.py:190–199  ·  view source on GitHub ↗

return a copy of this ClauseElement with annotations updated by the given dictionary.

(self, values: _AnnotationDict)

Source from the content-addressed store, hash-verified

188 ]
189
190 def _annotate(self, values: _AnnotationDict) -> Self:
191 """return a copy of this ClauseElement with annotations
192 updated by the given dictionary.
193
194 """
195 new = self._clone()
196 new._annotations = new._annotations.union(values)
197 new.__dict__.pop("_annotations_cache_key", None)
198 new.__dict__.pop("_generate_cache_key", None)
199 return new
200
201 def _with_annotations(self, values: _AnnotationDict) -> Self:
202 """return a copy of this ClauseElement with annotations

Callers

nothing calls this directly

Calls 3

_cloneMethod · 0.45
unionMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected