MCPcopy Create free account
hub / github.com/python/cpython / get_pydoc_link

Function get_pydoc_link

Lib/test/test_pydoc/test_pydoc.py:339–346  ·  view source on GitHub ↗

Returns a documentation web link of a module

(module)

Source from the content-addressed store, hash-verified

337 return re.sub('\b.', '', doc)
338
339def get_pydoc_link(module):
340 "Returns a documentation web link of a module"
341 abspath = os.path.abspath
342 dirname = os.path.dirname
343 basedir = dirname(dirname(dirname(abspath(__file__))))
344 doc = pydoc.TextDoc()
345 loc = doc.getdocloc(module, basedir=basedir)
346 return loc
347
348def get_pydoc_text(module):
349 "Returns pydoc generated output as text"

Calls 3

getdoclocMethod · 0.80
dirnameFunction · 0.50
abspathFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…