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

Function make_default_commands

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

Source from the content-addressed store, hash-verified

86
87
88def make_default_commands() -> dict[CommandName, type[Command]]:
89 result: dict[CommandName, type[Command]] = {}
90 for v in vars(commands).values():
91 if isinstance(v, type) and issubclass(v, Command) and v.__name__[0].islower():
92 result[v.__name__] = v
93 result[v.__name__.replace("_", "-")] = v
94 return result
95
96
97default_keymap: tuple[tuple[KeySpec, CommandName], ...] = tuple(

Callers

nothing calls this directly

Calls 6

varsFunction · 0.85
isinstanceFunction · 0.85
issubclassFunction · 0.85
valuesMethod · 0.45
islowerMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected