Closed Lee-W closed 1 year ago
This also relates to https://github.com/commitizen-tools/commitizen/issues/153 as most of the untyped parts are from configurations.
Also, https://github.com/commitizen-tools/commitizen/issues/300
I'd avoid introducing more dependencies if possible and potentially use dataclasses instead. Or typeddict.
I'm wondering also, would it be possible to easily add new settings when creating a custom commitizen?
I'd avoid introducing more dependencies if possible and potentially use dataclasses instead. Or typeddict.
Let's try TypeDict first then. It would be easier than using dataclasses. we can migrate to dataclass if we find it more maintainable.
I'm wondering also, would it be possible to easily add new settings when creating a custom commitizen?
not sure, but that's part of the goal of this refactor as well
I would take this issue in the sprint of PyConTW'21.
Hi @josix , I'm actually working on it. Which part do you want to start from? Maybe we could split our effort.
I would like to use TypedDict
to define the available fields for JSON, YAML, TOML config first.
Sure :) Then, I'll focus on other parts first. I'm thinking of creating another feature branch and merge it once we finish all the refactoring.
Both of this are typedict now
CzSettings
Settings
closing as it looks like it was fixed.
Feel free to open again if I made a mistake
Yep, it looks better than it was. I think the next step is moving some conventional commit defaults out of the global default. But we could create another issue for that
Sounds good
Description
currently, we use dict to dynamically manage our settings/configurations which makes it a bit hard to maintain if any new settings are to introduce
Possible Solution
Additional context
Related Issue