files
Contains methods for finding and reading configuration files.
Attributes¶
Classes¶
Functions:¶
find_config_file
¶
find_config_file(explicit_file: Optional[Pathlike] = None) -> Union[Path, None]
get_pep621_info
¶
get_pep621_info(config_file: Optional[Pathlike] = None) -> Optional[PEP621Info]
Retrieve the PEP 621 project table.
At the moment, only the project.version key is handled. Additionally, if the
version is marked as dynamic, then it is explicitly returned as None.
| PARAMETER | DESCRIPTION |
|---|---|
config_file
|
The configuration file to explicitly use. Per PEP 621, this file must be
named |
| RETURNS | DESCRIPTION |
|---|---|
Optional[PEP621Info]
|
A |
read_config_file
¶
read_config_file(config_file: Optional[Pathlike] = None) -> Dict[str, Any]
read_toml_file
¶
read_toml_file(file_path: Path) -> Dict[str, Any]
update_config_file
¶
update_config_file(config_file: Union[str, Path], config: Config, current_version: Version, new_version: Version, context: MutableMapping, dry_run: bool = False) -> None
Update the current_version key in the configuration file.
| PARAMETER | DESCRIPTION |
|---|---|
config_file
|
The configuration file to explicitly use. |
config
|
The configuration to use.
TYPE:
|
current_version
|
The current version.
TYPE:
|
new_version
|
The new version.
TYPE:
|
context
|
The context to use for serialization.
TYPE:
|
dry_run
|
True if the update should be a dry run.
TYPE:
|