Load multiple Python config files, merging each of them in turn. Parameters ---------- config_files : list of str List of config files names to load and merge into the config. path : unicode The full path to the location of the config files.
(config_files: list[str], path: str)
| 1156 | |
| 1157 | |
| 1158 | def load_pyconfig_files(config_files: list[str], path: str) -> Config: |
| 1159 | """Load multiple Python config files, merging each of them in turn. |
| 1160 | |
| 1161 | Parameters |
| 1162 | ---------- |
| 1163 | config_files : list of str |
| 1164 | List of config files names to load and merge into the config. |
| 1165 | path : unicode |
| 1166 | The full path to the location of the config files. |
| 1167 | """ |
| 1168 | config = Config() |
| 1169 | for cf in config_files: |
| 1170 | loader = PyFileConfigLoader(cf, path=path) |
| 1171 | try: |
| 1172 | next_config = loader.load_config() |
| 1173 | except ConfigFileNotFound: |
| 1174 | pass |
| 1175 | except Exception: |
| 1176 | raise |
| 1177 | else: |
| 1178 | config.merge(next_config) |
| 1179 | return config |
nothing calls this directly
no test coverage detected
searching dependent graphs…