(self, key: str, value: object)
| 40 | json.dump({"commitizen": {}}, json_file) |
| 41 | |
| 42 | def set_key(self, key: str, value: object) -> Self: |
| 43 | with self.path.open("rb") as f: |
| 44 | config_doc = json.load(f) |
| 45 | |
| 46 | config_doc["commitizen"][key] = value |
| 47 | with smart_open(self.path, "w", encoding=self._settings["encoding"]) as f: |
| 48 | json.dump(config_doc, f, indent=2) |
| 49 | return self |
| 50 | |
| 51 | def _parse_setting(self, data: bytes | str) -> None: |
| 52 | """We expect to have a section in .cz.json looking like |