MCPcopy
hub / github.com/sanic-org/sanic / run

Method run

sanic/cli/executor.py:38–46  ·  view source on GitHub ↗
(self, command: str, args: list[str])

Source from the content-addressed store, hash-verified

36 self.parser = self._make_parser()
37
38 def run(self, command: str, args: list[str]) -> None:
39 if command == "exec":
40 args = ["--help"]
41 parsed_args = self.parser.parse_args(args)
42 if command not in self.commands:
43 raise ValueError(f"Unknown command: {command}")
44 parsed_kwargs = vars(parsed_args)
45 parsed_kwargs.pop("command")
46 run(self.commands[command](**parsed_kwargs))
47
48 def _make_commands(self) -> dict[str, Callable]:
49 commands = {c.name: c.func for c in self.app._future_commands}

Callers

nothing calls this directly

Calls 2

runFunction · 0.50
popMethod · 0.45

Tested by

no test coverage detected