ConfigDescriptor#

class swordfish._config.ConfigDescriptor(val_type, default_value=None)#

A descriptor for managing configuration values.

Parameters:
  • val_type (Type[T])

  • default_value (T | None)

config_name: str#

The name of the configuration.

config_type: Type[T]#

The type of the configuration value.

config_value: T | None#

The current value of the configuration.

init(val_type, default_value=None)#
Parameters:
  • val_type (Type[T])

  • default_value (T | None)

get_value_str()#
is_default()#

Checks if the configuration value matches the default value.

Returns:

True if the current value is the default, False otherwise.

Return type:

bool