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

Method index

Lib/pydoc.py:1221–1234  ·  view source on GitHub ↗

Generate an HTML index for a directory of modules.

(self, dir, shadowed=None)

Source from the content-addressed store, hash-verified

1219 return lhs + self.repr(object)
1220
1221 def index(self, dir, shadowed=None):
1222 """Generate an HTML index for a directory of modules."""
1223 modpkgs = []
1224 if shadowed is None: shadowed = {}
1225 for importer, name, ispkg in pkgutil.iter_modules([dir]):
1226 if any((0xD800 <= ord(ch) <= 0xDFFF) for ch in name):
1227 # ignore a module if its name contains a surrogate character
1228 continue
1229 modpkgs.append((name, '', ispkg, name in shadowed))
1230 shadowed[name] = 1
1231
1232 modpkgs.sort()
1233 contents = self.multicolumn(modpkgs, self.modpkglink)
1234 return self.bigsection(dir, 'index', contents)
1235
1236# -------------------------------------------- text documentation generator
1237

Callers 15

parse_intFunction · 0.45
_strptimeFunction · 0.45
disFunction · 0.45
_replace_encodingFunction · 0.45
_as_int2Function · 0.45
formatyearMethod · 0.45
cert_time_to_secondsFunction · 0.45
compiler_fixupFunction · 0.45
html_indexFunction · 0.45
_getmemberMethod · 0.45
_paramspec_prepare_substFunction · 0.45

Calls 6

multicolumnMethod · 0.95
bigsectionMethod · 0.95
ordFunction · 0.85
anyFunction · 0.70
appendMethod · 0.45
sortMethod · 0.45

Tested by 2

generate_slicesFunction · 0.36