Documentation

arx.cli

arx.cli

Source: packages/arx/src/arx/cli.py

title: Functions and classes for handling the CLI call.

Functions

create_arx_application() -> ArxApplication

title: Create the compiler application without loading it for metadata CLI.
returns:
  type: ArxApplication

report_compiler_error(error: Exception, diagnostic_format: str='human') -> bool

title: Render one known compiler failure without hiding internal errors.
parameters:
  error:
    type: Exception
  diagnostic_format:
    type: str
returns:
  type: bool

report_internal_error(diagnostic_format: str='human') -> None

title: Render a non-source internal compiler failure safely.
parameters:
  diagnostic_format:
    type: str

get_args() -> argparse.ArgumentParser

title: Get the CLI arguments.
returns:
  type: argparse.ArgumentParser

get_test_args() -> argparse.ArgumentParser

title: Get the CLI arguments for `arx test`.
returns:
  type: argparse.ArgumentParser

show_version() -> None

title: Show the application version.

app(argv: Sequence[str] | None=None) -> None

title: Run the application.
parameters:
  argv:
    type: Sequence[str] | None

Classes

ArxApplication(Protocol)

title: Define the CLI-facing compiler application contract.

Methods

run(self, **kwargs: Any) -> None
title: Run one normal compiler command.
parameters:
  kwargs:
    type: Any
    variadic: keyword
run_tests(self, **kwargs: Any) -> int
title: Run one compiled-language test command.
parameters:
  kwargs:
    type: Any
    variadic: keyword
returns:
  type: int

CustomHelpFormatter(argparse.RawTextHelpFormatter)

title: Formatter for generating usage messages and argument help strings.
summary: >-
  Only the name of this class is considered a public API. All the methods
  provided by the class are considered an implementation detail.

Search documentation

Type to search.