MCPcopy Index your code
hub / github.com/python/cpython / make_default_commands

Function make_default_commands

Lib/_pyrepl/reader.py:55–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53
54
55def make_default_commands() -> dict[CommandName, type[Command]]:
56 result: dict[CommandName, type[Command]] = {}
57 for v in vars(commands).values():
58 if isinstance(v, type) and issubclass(v, Command) and v.__name__[0].islower():
59 result[v.__name__] = v
60 result[v.__name__.replace("_", "-")] = v
61 return result
62
63
64default_keymap: tuple[tuple[KeySpec, CommandName], ...] = tuple(

Callers

nothing calls this directly

Calls 3

islowerMethod · 0.80
valuesMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…