MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _deannotate_pairs

Method _deannotate_pairs

lib/sqlalchemy/orm/relationships.py:3138–3147  ·  view source on GitHub ↗

provide deannotation for the various lists of pairs, so that using them in hashes doesn't incur high-overhead __eq__() comparisons against original columns mapped.

(
        self, collection: _ColumnPairIterable
    )

Source from the content-addressed store, hash-verified

3136 )
3137
3138 def _deannotate_pairs(
3139 self, collection: _ColumnPairIterable
3140 ) -> _MutableColumnPairs:
3141 """provide deannotation for the various lists of
3142 pairs, so that using them in hashes doesn't incur
3143 high-overhead __eq__() comparisons against
3144 original columns mapped.
3145
3146 """
3147 return [(x._deannotate(), y._deannotate()) for x, y in collection]
3148
3149 def _setup_pairs(self) -> None:
3150 sync_pairs: _MutableColumnPairs = []

Callers 1

_setup_pairsMethod · 0.95

Calls 1

_deannotateMethod · 0.45

Tested by

no test coverage detected