CLRootParam

CLRootParam

class CLRootParam[source]

Bases: configpile.handlers.CLParam[pathlib.Path]

A root path parameter handler

Changes the root path used to resolve configuration file relative paths

Attributes

Note: attributes inherited from parent classes are not shown here, if any

Methods

action

A method called on the successful parse of a value

handle

Processes arguments, possibly updating the state or returning errors

List of members of CLRootParam

action(value, state)[source]

A method called on the successful parse of a value

Can be overridden. By default does nothing.

Parameters
  • value (Path) – Parsed value

  • state (State) – State to possibly update

Return type

Optional[Err]

Returns

An optional error

__init__(param)
static __new__(cls, *args, **kwds)
handle(args, state)

Processes arguments, possibly updating the state or returning errors

Parameters
  • args (Sequence[str]) – Command-line arguments not processed yet

  • state (State) – (Mutable) state to possibly update

Return type

Tuple[Sequence[str], Optional[Err]]

Returns

The updated command-line and an optional error

param: configpile.arg.Param[configpile.handlers._Value]

Parameter to handle