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

Function _safe_annotate

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

Source from the content-addressed store, hash-verified

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

Callers 2

cloneFunction · 0.85
mark_exclude_colsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected