We expect to have a section in pyproject looking like ``` [tool.commitizen] name = "cz_conventional_commits" ```
(self, data: bytes | str)
| 52 | return self |
| 53 | |
| 54 | def _parse_setting(self, data: bytes | str) -> None: |
| 55 | """We expect to have a section in pyproject looking like |
| 56 | |
| 57 | ``` |
| 58 | [tool.commitizen] |
| 59 | name = "cz_conventional_commits" |
| 60 | ``` |
| 61 | """ |
| 62 | try: |
| 63 | doc = parse(data) |
| 64 | except exceptions.ParseError as e: |
| 65 | raise InvalidConfigurationError(f"Failed to parse {self.path}: {e}") |
| 66 | |
| 67 | try: |
| 68 | self.settings.update(doc["tool"]["commitizen"]) # type: ignore[index,typeddict-item] # TODO: fix this |
| 69 | except exceptions.NonExistentKey: |
| 70 | pass |
no test coverage detected