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
2
import re
3
+ from typing import TypedDict
3
4
4
5
from commitizen import defaults
5
6
from commitizen .cz .base import BaseCommitizen
@@ -27,6 +28,15 @@ def parse_subject(text):
27
28
return required_validator (text , msg = "Subject is required." )
28
29
29
30
31
+ class ConventionalCommitsAnswers (TypedDict ):
32
+ prefix : str
33
+ scope : str
34
+ subject : str
35
+ body : str
36
+ footer : str
37
+ is_breaking_change : bool
38
+
39
+
30
40
class ConventionalCommitsCz (BaseCommitizen ):
31
41
bump_pattern = defaults .BUMP_PATTERN
32
42
bump_map = defaults .BUMP_MAP
@@ -147,7 +157,7 @@ def questions(self) -> Questions:
147
157
},
148
158
]
149
159
150
- def message (self , answers : dict ) -> str :
160
+ def message (self , answers : ConventionalCommitsAnswers ) -> str : # type: ignore[override]
151
161
prefix = answers ["prefix" ]
152
162
scope = answers ["scope" ]
153
163
subject = answers ["subject" ]
You can’t perform that action at this time.
0 commit comments