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

Method load_config

traitlets/config/loader.py:615–623  ·  view source on GitHub ↗

Load the config from a file and return it as a Config object.

(self)

Source from the content-addressed store, hash-verified

613 """
614
615 def load_config(self) -> Config:
616 """Load the config from a file and return it as a Config object."""
617 self.clear()
618 try:
619 self._find_file()
620 except OSError as e:
621 raise ConfigFileNotFound(str(e)) from e
622 self._read_file_as_dict()
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"""

Callers 2

test_pythonMethod · 0.95
load_pyconfig_filesFunction · 0.95

Calls 4

_read_file_as_dictMethod · 0.95
ConfigFileNotFoundClass · 0.85
clearMethod · 0.80
_find_fileMethod · 0.80

Tested by 1

test_pythonMethod · 0.76