State
State¶
- class State[source]¶
Bases:
object
Describes the (mutable) state of a configuration being parsed
Attributes
Note: attributes inherited from parent classes are not shown here, if any
Base path to use to resolve relative config file paths
Contains the sequence of values for each parameter
Contains a list of configuration files to process
Contains a special action if flag was encountered
Methods
Appends a value to a parameter
Creates the initial state, populated with the default values when present
List of members of State
- root_path: Optional[pathlib.Path]¶
Base path to use to resolve relative config file paths
- config_files_to_process: List[pathlib.Path]¶
Contains a list of configuration files to process
- special_action: Optional[configpile.enums.SpecialAction]¶
Contains a special action if flag was encountered
- append(key, value)[source]¶
Appends a value to a parameter
No type checking is performed, be careful.
- static make(root_path, params)[source]¶
Creates the initial state, populated with the default values when present
- Parameters
- Raises
ValueError – If a default value cannot be parsed correctly
- Return type
- Returns
The initial mutable state
- __init__(root_path, instances, config_files_to_process, special_action)¶