KVRootParam

KVRootParam

class KVRootParam[source]

Bases: configpile.handlers.KVParam[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

List of members of KVRootParam

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(value, state)

Processes

Parameters
  • value (str) – Value to parse and process

  • state (State) – State to update

Return type

Optional[Err]

Returns

An error if an error occurred

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

Parameter to handle