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

Function _findclass

Lib/inspect.py:700–708  ·  view source on GitHub ↗
(func)

Source from the content-addressed store, hash-verified

698 return len(expline) - len(expline.lstrip())
699
700def _findclass(func):
701 cls = sys.modules.get(func.__module__)
702 if cls is None:
703 return None
704 for name in func.__qualname__.split('.')[:-1]:
705 cls = getattr(cls, name)
706 if not isclass(cls):
707 return None
708 return cls
709
710def _finddoc(obj, *, search_in_class=True):
711 if search_in_class and isclass(obj):

Callers 1

_finddocFunction · 0.85

Calls 3

isclassFunction · 0.85
getMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…