MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / is_sibling

Method is_sibling

lib/sqlalchemy/orm/mapper.py:3325–3334  ·  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

3323 return self.base_mapper is other.base_mapper
3324
3325 def is_sibling(self, other: Mapper[Any]) -> bool:
3326 """return true if the other mapper is an inheriting sibling to this
3327 one. common parent but different branch
3328
3329 """
3330 return (
3331 self.base_mapper is other.base_mapper
3332 and not self.isa(other)
3333 and not other.isa(self)
3334 )
3335
3336 def _canload(
3337 self, state: InstanceState[Any], allow_subtypes: bool

Callers 1

Calls 1

isaMethod · 0.95

Tested by

no test coverage detected