MCPcopy Create free account
hub / github.com/ipython/traitlets / load_subconfig

Method load_subconfig

traitlets/config/loader.py:625–638  ·  view source on GitHub ↗

Injected into config file namespace as load_subconfig

(self, fname: str, path: str | None = None)

Source from the content-addressed store, hash-verified

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."""

Callers

nothing calls this directly

Calls 2

mergeMethod · 0.80
load_configMethod · 0.45

Tested by

no test coverage detected