Skip to content

Config

PARAM_AUTO_BOOLEAN = 6 module-attribute

PARAM_BOOLEAN = 0 module-attribute

PARAM_CLASSES = {bool: PARAM_BOOLEAN, int: PARAM_ZINTEGER, str: PARAM_STRING} module-attribute

PARAM_ENUM = 4 module-attribute

PARAM_INTEGER = 8 module-attribute

PARAM_OPTIONAL_FILENAME = 5 module-attribute

PARAM_STRING = 2 module-attribute

PARAM_UINTEGER = 9 module-attribute

PARAM_ZINTEGER = 1 module-attribute

PARAM_ZUINTEGER = 3 module-attribute

PARAM_ZUINTEGER_UNLIMITED = 7 module-attribute

T = TypeVar('T') module-attribute

Config

params: Dict[str, Parameter] = {} instance-attribute

triggers: DefaultDict[str, List[Callable[..., Any]]] = defaultdict(list) instance-attribute

__getattr__(name)

__init__()

add_param(name, default, set_show_doc, *, help_docstring='', param_class=None, enum_sequence=None, scope='config')

add_param_obj(p)

get_params(scope)

trigger(*params)

Parameter

default = default instance-attribute

enum_sequence = enum_sequence instance-attribute

help_docstring = help_docstring.strip() instance-attribute

is_changed: bool property

name = name instance-attribute

param_class = param_class or PARAM_CLASSES[type(default)] instance-attribute

scope = scope instance-attribute

set_show_doc = set_show_doc.strip() instance-attribute

value = default instance-attribute

__add__(other)

__bool__()

__div__(other)

__eq__(other)

__floordiv__(other)

__getattr__(name)

__init__(name, default, set_show_doc, *, help_docstring='', param_class=None, enum_sequence=None, scope='config')

__int__()

__len__()

__lt__(other)

__mod__(other)

__mul__(other)

__pow__(other)

__radd__(other)

__rmul__(other)

__rsub__(other)

__str__()

__sub__(other)

attr_name()

Returns the attribute name associated with this config option, i.e. my-config has the attribute name my_config

revert_default()