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

Function resolve

Lib/pydoc.py:1744–1756  ·  view source on GitHub ↗

Given an object or a path to an object, get the object and its name.

(thing, forceload=0)

Source from the content-addressed store, hash-verified

1742html = HTMLDoc()
1743
1744def resolve(thing, forceload=0):
1745 """Given an object or a path to an object, get the object and its name."""
1746 if isinstance(thing, str):
1747 object = locate(thing, forceload)
1748 if object is None:
1749 raise ImportError('''\
1750No Python documentation found for %r.
1751Use help() to get the interactive help utility.
1752Use help(str) for help on the str class.''' % thing)
1753 return object, thing
1754 else:
1755 name = getattr(thing, '__name__', None)
1756 return thing, name if isinstance(name, str) else None
1757
1758def render_doc(thing, title='Python Library Documentation: %s', forceload=0,
1759 renderer=None):

Callers 3

render_docFunction · 0.70
writedocFunction · 0.70
as_jsMethod · 0.50

Calls 3

isinstanceFunction · 0.85
locateFunction · 0.85
getattrFunction · 0.85

Tested by

no test coverage detected