CLHandler

CLHandler

class CLHandler[source]

Bases: abc.ABC

A handler for command-line arguments

Methods

handle

Processes arguments, possibly updating the state or returning errors

List of members of CLHandler

abstract handle(args, state)[source]

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