(
config: ConfigParser, default_values: Mapping[str, Mapping[str, Any]]
)
| 85 | |
| 86 | |
| 87 | def fill_config_with_default_values( |
| 88 | config: ConfigParser, default_values: Mapping[str, Mapping[str, Any]] |
| 89 | ) -> None: |
| 90 | for section in default_values.keys(): |
| 91 | if not config.has_section(section): |
| 92 | config.add_section(section) |
| 93 | |
| 94 | for opt, val in default_values[section].items(): |
| 95 | if not config.has_option(section, opt): |
| 96 | config.set(section, opt, str(val)) |
| 97 | |
| 98 | |
| 99 | class Config: |