Injected into config file namespace as load_subconfig
(self, fname: str, path: str | None = None)
| 623 | return self.config |
| 624 | |
| 625 | def load_subconfig(self, fname: str, path: str | None = None) -> None: |
| 626 | """Injected into config file namespace as load_subconfig""" |
| 627 | if path is None: |
| 628 | path = self.path |
| 629 | |
| 630 | loader = self.__class__(fname, path) |
| 631 | try: |
| 632 | sub_config = loader.load_config() |
| 633 | except ConfigFileNotFound: |
| 634 | # Pass silently if the sub config is not there, |
| 635 | # treat it as an empty config file. |
| 636 | pass |
| 637 | else: |
| 638 | self.config.merge(sub_config) |
| 639 | |
| 640 | def _read_file_as_dict(self) -> None: |
| 641 | """Load the config file into self.config, with recursive loading.""" |
nothing calls this directly
no test coverage detected