MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _findclass

Function _findclass

tools/python-3.11.9-amd64/Lib/inspect.py:772–780  ·  view source on GitHub ↗
(func)

Source from the content-addressed store, hash-verified

770 return len(expline) - len(expline.lstrip())
771
772def _findclass(func):
773 cls = sys.modules.get(func.__module__)
774 if cls is None:
775 return None
776 for name in func.__qualname__.split('.')[:-1]:
777 cls = getattr(cls, name)
778 if not isclass(cls):
779 return None
780 return cls
781
782def _finddoc(obj):
783 if isclass(obj):

Callers 1

_finddocFunction · 0.70

Calls 3

isclassFunction · 0.85
getMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected