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

Method _read_file_as_dict

traitlets/config/loader.py:640–655  ·  view source on GitHub ↗

Load the config file into self.config, with recursive loading.

(self)

Source from the content-addressed store, hash-verified

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
658class CommandLineConfigLoader(ConfigLoader):

Callers 1

load_configMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected