Setting

class Setting(key: str, factory_value: Any, value_type: type, description: str)[source]

Bases: object

A class representing a single configuration setting.

key

The name/identifier of the setting.

Type:

str

value

The current value of the setting.

Type:

Any

value_type

The expected type of the value (e.g., int, float, str, enum).

Type:

type

description

A description of what the setting controls.

Type:

str

type0

The base type (e.g., list if value_type is list[int]).

Type:

type

type1

The inner type for lists (e.g., int if value_type

Type:

type | None

is list[int]).
__init__(key: str, factory_value: Any, value_type: type, description: str) None[source]

Initialize a new Setting.

Parameters:
  • key (str) – The name of the setting.

  • factory_value (Any) – The default value. For enums, this is the

  • representation. (string)

  • value_type (type) – The type of the value.

  • description (str) – A brief description of the setting.

Methods