project_config.config package
Configuration handler.
- class project_config.config.Config(args: Namespace, **kwargs: Any)[source]
Bases:
FileConfig
Main configuration wrapper.
This class is the main configuration wrapper. It is used to load a configuration object from CLI arguments.
- class project_config.config.FileConfig(rootdir: str, path: str | None, store_raw_config: bool = False)[source]
Bases:
object
File configuration wrapper.
Stores the data of the project-config configuration defined in the file ‘.project-config.toml’ or equivalent. The configuration of the file is stored in the
dict_
attribute.
- project_config.config.initialize_config(config_fpath: str) str [source]
Initialize the configuration.
- project_config.config.read_config(rootdir: str, custom_fpath: Optional[str] = None) tuple[str, Any] [source]
Read the configuration from a file.
- project_config.config.read_config_from_pyproject_toml(fpath: str) Any [source]
Read the configuration from the pyproject.toml file.
- Returns:
None
if not found, configuration data otherwise.- Return type:
- project_config.config.reporter_from_config(config: Config) Any [source]
Instanciate a reporter from a configuration object.
- Parameters:
config (Config) – Configuration object.
- project_config.config.validate_cli_config(config_path: str, config: dict[str, Any]) dict[str, Any] [source]
Validates the CLI configuration.
- project_config.config.validate_config(config_path: str, config: Any) None [source]
Validate a configuration.
- project_config.config.validate_config_cache(config: Any) list[str] [source]
Validate the
cache
field of a configuration object.
- project_config.config.validate_config_style(config: Any) list[str] [source]
Validate the
style
field of a configuration object.