File tree Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -210,23 +210,20 @@ def _ask_tag(self) -> str:
210
210
return latest_tag
211
211
212
212
def _ask_tag_format (self , latest_tag : str ) -> str :
213
- is_correct_format = False
214
213
if latest_tag .startswith ("v" ):
215
- tag_format = r"v$version"
216
- is_correct_format = questionary .confirm (
217
- f'Is "{ tag_format } " the correct tag format?' , style = self .cz .style
218
- ).unsafe_ask ()
214
+ v_tag_format = r"v$version"
215
+ if questionary .confirm (
216
+ f'Is "{ v_tag_format } " the correct tag format?' , style = self .cz .style
217
+ ).unsafe_ask ():
218
+ return v_tag_format
219
219
220
220
default_format = DEFAULT_SETTINGS ["tag_format" ]
221
- if not is_correct_format :
222
- tag_format = questionary .text (
223
- f'Please enter the correct version format: (default: "{ default_format } ")' ,
224
- style = self .cz .style ,
225
- ).unsafe_ask ()
221
+ tag_format : str = questionary .text (
222
+ f'Please enter the correct version format: (default: "{ default_format } ")' ,
223
+ style = self .cz .style ,
224
+ ).unsafe_ask ()
226
225
227
- if not tag_format :
228
- tag_format = default_format
229
- return tag_format
226
+ return tag_format or default_format
230
227
231
228
def _ask_version_provider (self ) -> str :
232
229
"""Ask for setting: version_provider"""
You can’t perform that action at this time.
0 commit comments