MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _safe_annotate

Function _safe_annotate

lib/sqlalchemy/sql/annotation.py:401–410  ·  view source on GitHub ↗
(to_annotate: _SA, annotations: _AnnotationDict)

Source from the content-addressed store, hash-verified

399
400
401def _safe_annotate(to_annotate: _SA, annotations: _AnnotationDict) -> _SA:
402 try:
403 _annotate = to_annotate._annotate
404 except AttributeError:
405 # skip objects that don't actually have an `_annotate`
406 # attribute, namely QueryableAttribute inside of a join
407 # condition
408 return to_annotate
409 else:
410 return _annotate(annotations)
411
412
413def _deep_annotate(

Callers 2

cloneFunction · 0.85
mark_exclude_colsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected