(to_annotate: _SA, annotations: _AnnotationDict)
| 399 | |
| 400 | |
| 401 | def _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 | |
| 413 | def _deep_annotate( |
no outgoing calls
no test coverage detected