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 1
1
import os
2
+ from typing import TypedDict
2
3
3
4
from commitizen import defaults
4
5
from commitizen .cz .base import BaseCommitizen
@@ -16,6 +17,15 @@ def _parse_subject(text: str) -> str:
16
17
return required_validator (text .strip ("." ).strip (), msg = "Subject is required." )
17
18
18
19
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
+
19
29
class ConventionalCommitsCz (BaseCommitizen ):
20
30
bump_pattern = defaults .BUMP_PATTERN
21
31
bump_map = defaults .BUMP_MAP
@@ -136,7 +146,7 @@ def questions(self) -> list[CzQuestion]:
136
146
},
137
147
]
138
148
139
- def message (self , answers : dict ) -> str :
149
+ def message (self , answers : ConventionalCommitsAnswers ) -> str : # type: ignore[override]
140
150
prefix = answers ["prefix" ]
141
151
scope = answers ["scope" ]
142
152
subject = answers ["subject" ]
You can’t perform that action at this time.
0 commit comments