config

Module for configuration settings.

config.load(files: list | None = None) None[source]

Load the specified configuration files. Missing keys will be filled in with the defaults in DEFAULT_CONFIG.

Parameters:

files – List of configuration files.

Returns:

None

config.update(cfg: dict) None[source]

Update the global configuration with values from the provided dictionary.

Parameters:

cfg – Dictionary containing new configuration values.

Returns:

None

config.update_dict(old_dict: dict, new_dict: dict) None[source]

Add key value pairs from new_dict to old_dict. If a key in new_dict does not exist in old_dict, it is added. If the value is a dict or list, the values are merged recursively. If a key in new_dict starts with ‘~’, it overrides the value in old_dict instead. If the value is None, the key is removed from old_dict instead.

Parameters:
  • old_dict – Dictionary to be updated.

  • new_dict – Dictionary with new values.

Returns:

None

config.update_list(old_list: list, new_list: list) None[source]

Append values from new_list to old_list. Strings beginning with ‘~’ are removed from old_list instead.

Parameters:
  • old_list – List to be updated.

  • new_list – List with new values.

Returns:

None