File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
commitizen/cz/conventional_commits Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 11import os
2+ from typing import TypedDict
23
34from commitizen import defaults
45from commitizen .cz .base import BaseCommitizen
@@ -16,6 +17,15 @@ def _parse_subject(text: str) -> str:
1617 return required_validator (text .strip ("." ).strip (), msg = "Subject is required." )
1718
1819
20+ class ConventionalCommitsAnswers (TypedDict ):
21+ prefix : str
22+ scope : str
23+ subject : str
24+ body : str
25+ footer : str
26+ is_breaking_change : bool
27+
28+
1929class ConventionalCommitsCz (BaseCommitizen ):
2030 bump_pattern = defaults .BUMP_PATTERN
2131 bump_map = defaults .BUMP_MAP
@@ -136,7 +146,7 @@ def questions(self) -> list[CzQuestion]:
136146 },
137147 ]
138148
139- def message (self , answers : dict ) -> str :
149+ def message (self , answers : ConventionalCommitsAnswers ) -> str : # type: ignore[override]
140150 prefix = answers ["prefix" ]
141151 scope = answers ["scope" ]
142152 subject = answers ["subject" ]
You can’t perform that action at this time.
0 commit comments