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

Function _findclass

Lib/pydoc.py:111–119  ·  view source on GitHub ↗
(func)

Source from the content-addressed store, hash-verified

109 return dirs
110
111def _findclass(func):
112 cls = sys.modules.get(func.__module__)
113 if cls is None:
114 return None
115 for name in func.__qualname__.split('.')[:-1]:
116 cls = getattr(cls, name)
117 if not inspect.isclass(cls):
118 return None
119 return cls
120
121def _finddoc(obj):
122 if inspect.ismethod(obj):

Callers 1

_finddocFunction · 0.70

Calls 3

getattrFunction · 0.85
getMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected