File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -215,11 +215,13 @@ def __call__(self) -> None:
215
215
raise NotAllowed ("--local-version cannot be combined with --build-metadata" )
216
216
217
217
if get_next :
218
- # if trying to use --get-next, we should not allow --changelog or --changelog-to-stdout
219
- if self .changelog_flag or self .changelog_to_stdout :
220
- raise NotAllowed (
221
- "--changelog or --changelog-to-stdout is not allowed with --get-next"
222
- )
218
+ for value , option in (
219
+ (self .changelog_flag , "--changelog" ),
220
+ (self .changelog_to_stdout , "--changelog-to-stdout" ),
221
+ ):
222
+ if value :
223
+ raise NotAllowed (f"{ option } cannot be combined with --get-next" )
224
+
223
225
# --get-next is a special case, taking precedence over config for 'update_changelog_on_bump'
224
226
self .changelog_config = False
225
227
# Setting dry_run to prevent any unwanted changes to the repo or files
You can’t perform that action at this time.
0 commit comments