load_config
get_interpreters_from_yaml(config_file)
Parse the 'interpreters' variable out of the user's config yaml file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config_file |
str
|
path to the user's config yaml file |
required |
Raises:
| Type | Description |
|---|---|
InvalidYamlFormatError
|
if yaml parser fails to load the user's config |
UserYamlDesignError
|
if yaml does not contain the 'default_context' key |
Returns:
| Type | Description |
|---|---|
Optional[SupportedInterpreters]
|
t.Mapping[str, t.Sequence[str]]: dictionary with intepreters as a sequence of strings, mapped to the 'supported-interpreters' key |
Source code in src/cookiecutter_python/backend/load_config.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | |