MCPcopy Create free account
hub / github.com/commitizen-tools/commitizen / set_key

Method set_key

commitizen/config/toml_config.py:46–52  ·  view source on GitHub ↗
(self, key: str, value: object)

Source from the content-addressed store, hash-verified

44 )
45
46 def set_key(self, key: str, value: object) -> Self:
47 config_doc = parse(self.path.read_bytes())
48
49 config_doc["tool"]["commitizen"][key] = value # type: ignore[index]
50 self.path.write_bytes(config_doc.as_string().encode(self._settings["encoding"]))
51
52 return self
53
54 def _parse_setting(self, data: bytes | str) -> None:
55 """We expect to have a section in pyproject looking like

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected