()
| 30 | # This is duplicated with the one in cli/scratch. |
| 31 | # TODO - factor it out. |
| 32 | def main() -> None: |
| 33 | os.chdir(MZ_ROOT) |
| 34 | parser = argparse.ArgumentParser() |
| 35 | subparsers = parser.add_subparsers(dest="subcommand", required=True) |
| 36 | for cmd_name, configure, run in [ |
| 37 | ("start", configure_start, start), |
| 38 | ("check", configure_check, check), |
| 39 | # ("mine", mine.configure_parser, mine.run), |
| 40 | # ("destroy", destroy.configure_parser, destroy.run), |
| 41 | ]: |
| 42 | s = subparsers.add_parser(cmd_name) |
| 43 | configure(s) |
| 44 | s.set_defaults(run=run) |
| 45 | |
| 46 | args = parser.parse_args() |
| 47 | args.run(args) |
| 48 | |
| 49 | |
| 50 | def configure_start(parser: argparse.ArgumentParser) -> None: |
no test coverage detected