module documentation

Utils for arguments/options parsing and handling.

Constant PREPROCESSABLE_OPTIONS Undocumented
Function _add_plugins Add plugins to the list of loadable plugins.
Function _convert_option_to_argument Convert an optdict to an Argument class instance.
Function _enable_all_extensions Enable all extensions.
Function _init_hook Execute arbitrary code from the init_hook.
Function _parse_rich_type_value Parse rich (toml) types into strings.
Function _preprocess_options Pre-process options before full config parsing has started.
Function _set_output Set the output.
Function _set_rcfile Set the rcfile.
Function _set_verbose_mode Undocumented
PREPROCESSABLE_OPTIONS: dict[str, tuple[bool, Callable[[Run, str|None], None], int]] = (source)

Undocumented

Value
{'--init-hook': (True, _init_hook, 8),
 '--rcfile': (True, _set_rcfile, 4),
 '--output': (True, _set_output, 0),
 '--load-plugins': (True, _add_plugins, 5),
 '--verbose': (False, _set_verbose_mode, 4),
 '-v': (False, _set_verbose_mode, 2),
 '--enable-all-extensions': (False, _enable_all_extensions, 9)}
def _add_plugins(run: Run, value: str|None): (source)

Add plugins to the list of loadable plugins.

Convert an optdict to an Argument class instance.

def _enable_all_extensions(run: Run, value: str|None): (source)

Enable all extensions.

def _init_hook(run: Run, value: str|None): (source)

Execute arbitrary code from the init_hook. This can be used to set the 'sys.path' for example.

def _parse_rich_type_value(value: Any) -> str: (source)

Parse rich (toml) types into strings.

def _preprocess_options(run: Run, args: Sequence[str]) -> list[str]: (source)

Pre-process options before full config parsing has started.

def _set_output(run: Run, value: str|None): (source)

Set the output.

def _set_rcfile(run: Run, value: str|None): (source)

Set the rcfile.

def _set_verbose_mode(run: Run, value: str|None): (source)

Undocumented