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

Method classlink

Lib/pydoc.py:727–733  ·  view source on GitHub ↗

Make a link for a class.

(self, object, modname)

Source from the content-addressed store, hash-verified

725 return name
726
727 def classlink(self, object, modname):
728 """Make a link for a class."""
729 name, module = object.__name__, sys.modules.get(object.__module__)
730 if hasattr(module, name) and getattr(module, name) is object:
731 return '<a href="%s.html#%s">%s</a>' % (
732 module.__name__, name, classname(object, modname))
733 return classname(object, modname)
734
735 def parentlink(self, object, modname):
736 """Make a link for the enclosing class or module."""

Callers 3

formattreeMethod · 0.95
docclassMethod · 0.95
docroutineMethod · 0.95

Calls 4

hasattrFunction · 0.85
getattrFunction · 0.85
classnameFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected