MCPcopy Index your code
hub / github.com/python/cpython / __subclasscheck__

Method __subclasscheck__

Lib/typing.py:1634–1639  ·  view source on GitHub ↗
(self, cls)

Source from the content-addressed store, hash-verified

1632 return 'typing.' + self._name
1633
1634 def __subclasscheck__(self, cls):
1635 if isinstance(cls, _SpecialGenericAlias):
1636 return issubclass(cls.__origin__, self.__origin__)
1637 if not isinstance(cls, _GenericAlias):
1638 return issubclass(cls, self.__origin__)
1639 return super().__subclasscheck__(cls)
1640
1641 def __reduce__(self):
1642 return self._name

Callers

nothing calls this directly

Calls 2

superClass · 0.85
__subclasscheck__Method · 0.45

Tested by

no test coverage detected