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

Method is_sibling

lib/sqlalchemy/orm/mapper.py:3367–3376  ·  view source on GitHub ↗

return true if the other mapper is an inheriting sibling to this one. common parent but different branch

(self, other: Mapper[Any])

Source from the content-addressed store, hash-verified

3365 return self.base_mapper is other.base_mapper
3366
3367 def is_sibling(self, other: Mapper[Any]) -> bool:
3368 """return true if the other mapper is an inheriting sibling to this
3369 one. common parent but different branch
3370
3371 """
3372 return (
3373 self.base_mapper is other.base_mapper
3374 and not self.isa(other)
3375 and not other.isa(self)
3376 )
3377
3378 def _canload(
3379 self, state: InstanceState[Any], allow_subtypes: bool

Callers 1

Calls 1

isaMethod · 0.95

Tested by

no test coverage detected