MCPcopy Index your code
hub / github.com/RustPython/RustPython / is_related

Function is_related

Lib/functools.py:816–819  ·  view source on GitHub ↗
(typ)

Source from the content-addressed store, hash-verified

814 bases = set(cls.__mro__)
815 # Remove entries which are already present in the __mro__ or unrelated.
816 def is_related(typ):
817 return (typ not in bases and hasattr(typ, '__mro__')
818 and not isinstance(typ, GenericAlias)
819 and issubclass(cls, typ))
820 types = [n for n in types if is_related(n)]
821 # Remove entries which are strict bases of other entries (they will end up
822 # in the MRO anyway.

Callers 1

_compose_mroFunction · 0.85

Calls 3

hasattrFunction · 0.85
isinstanceFunction · 0.85
issubclassFunction · 0.85

Tested by

no test coverage detected