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

Method set

traitlets/config/manager.py:68–74  ·  view source on GitHub ↗

Store the given config data.

(self, section_name: str, data: Any)

Source from the content-addressed store, hash-verified

66 return {}
67
68 def set(self, section_name: str, data: Any) -> None:
69 """Store the given config data."""
70 filename = self.file_name(section_name)
71 self.ensure_config_dir_exists()
72
73 with open(filename, "w", encoding="utf-8") as f:
74 json.dump(data, f, indent=2)
75
76 def update(self, section_name: str, new_data: Any) -> Any:
77 """Modify the config section by recursively updating it with new_data.

Callers 1

updateMethod · 0.95

Calls 2

file_nameMethod · 0.95

Tested by

no test coverage detected