(self, argv: Optional[List[str]])
| 422 | sys.exit(1) # Same behavior as Python itself outside of REPL |
| 423 | |
| 424 | def parse_core(self, argv: Optional[List[str]]) -> None: |
| 425 | debug("argv given to Program.run: {!r}".format(argv)) |
| 426 | self.normalize_argv(argv) |
| 427 | |
| 428 | # Obtain core args (sets self.core) |
| 429 | self.parse_core_args() |
| 430 | debug("Finished parsing core args") |
| 431 | |
| 432 | # Set interpreter bytecode-writing flag |
| 433 | sys.dont_write_bytecode = not self.args["write-pyc"].value |
| 434 | |
| 435 | # Enable debugging from here on out, if debug flag was given. |
| 436 | # (Prior to this point, debugging requires setting INVOKE_DEBUG). |
| 437 | if self.args.debug.value: |
| 438 | enable_logging() |
| 439 | |
| 440 | # Short-circuit if --version |
| 441 | if self.args.version.value: |
| 442 | debug("Saw --version, printing version & exiting") |
| 443 | self.print_version() |
| 444 | raise Exit |
| 445 | |
| 446 | # Print (dynamic, no tasks required) completion script if requested |
| 447 | if self.args["print-completion-script"].value: |
| 448 | print_completion_script( |
| 449 | shell=self.args["print-completion-script"].value, |
| 450 | names=self.binary_names, |
| 451 | ) |
| 452 | raise Exit |
| 453 | |
| 454 | def parse_collection(self) -> None: |
| 455 | """ |
no test coverage detected