Load the config file into self.config, with recursive loading.
(self)
| 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.""" |
| 642 | |
| 643 | def get_config() -> Config: |
| 644 | """Unnecessary now, but a deprecation warning is more trouble than it's worth.""" |
| 645 | return self.config |
| 646 | |
| 647 | namespace = dict( # noqa: C408 |
| 648 | c=self.config, |
| 649 | load_subconfig=self.load_subconfig, |
| 650 | get_config=get_config, |
| 651 | __file__=self.full_filename, |
| 652 | ) |
| 653 | conf_filename = self.full_filename |
| 654 | with open(conf_filename, "rb") as f: |
| 655 | exec(compile(f.read(), conf_filename, "exec"), namespace, namespace) # noqa: S102 |
| 656 | |
| 657 | |
| 658 | class CommandLineConfigLoader(ConfigLoader): |