MCPcopy Index your code
hub / github.com/pyinvoke/invoke / parse_core

Method parse_core

invoke/program.py:424–452  ·  view source on GitHub ↗
(self, argv: Optional[List[str]])

Source from the content-addressed store, hash-verified

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 """

Callers 1

runMethod · 0.95

Calls 5

normalize_argvMethod · 0.95
parse_core_argsMethod · 0.95
print_versionMethod · 0.95
print_completion_scriptFunction · 0.90
enable_loggingFunction · 0.85

Tested by

no test coverage detected