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

Method modpkglink

Lib/pydoc.py:758–771  ·  view source on GitHub ↗

Make a link for a module or package to display in an index.

(self, modpkginfo)

Source from the content-addressed store, hash-verified

756 return '<a href="%s.html">%s</a>' % (object.__name__, object.__name__)
757
758 def modpkglink(self, modpkginfo):
759 """Make a link for a module or package to display in an index."""
760 name, path, ispackage, shadowed = modpkginfo
761 if shadowed:
762 return self.grey(name)
763 if path:
764 url = '%s.%s.html' % (path, name)
765 else:
766 url = '%s.html' % name
767 if ispackage:
768 text = '<strong>%s</strong>&nbsp;(package)' % name
769 else:
770 text = name
771 return '<a href="%s">%s</a>' % (url, text)
772
773 def filelink(self, url, path):
774 """Make a link to source file."""

Callers

nothing calls this directly

Calls 1

greyMethod · 0.95

Tested by

no test coverage detected