File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -314,16 +314,16 @@ def parse_no_raise(comma_separated_no_raise: str) -> List[int]:
314
314
Convert the given string with exit code digits or exit
315
315
codes name to its integer representation
316
316
"""
317
- no_raise_items = comma_separated_no_raise .split ("," )
317
+ no_raise_items : List [ str ] = comma_separated_no_raise .split ("," )
318
318
no_raise_codes = []
319
319
for item in no_raise_items :
320
320
if item .isdecimal ():
321
321
no_raise_codes .append (int (item ))
322
322
continue
323
323
try :
324
- exit_code = ExitCode [item ]
324
+ exit_code = ExitCode [item . strip () ]
325
325
except KeyError :
326
- out .warn (f"WARN: no_raise key { item } does not exist. Skipping." )
326
+ out .warn (f"WARN: no_raise key ` { item } ` does not exist. Skipping." )
327
327
continue
328
328
else :
329
329
no_raise_codes .append (exit_code .value )
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ class ExitCode(enum.IntEnum):
25
25
INVALID_COMMAND_ARGUMENT = 18
26
26
INVALID_CONFIGURATION = 19
27
27
NOT_ALLOWED = 20
28
+ NO_INCREMENT = 21
28
29
29
30
30
31
class CommitizenException (Exception ):
@@ -56,7 +57,7 @@ class DryRunExit(ExpectedExit):
56
57
57
58
58
59
class NoneIncrementExit (CommitizenException ):
59
- exit_code = ExitCode .NO_COMMITS_FOUND
60
+ exit_code = ExitCode .NO_INCREMENT
60
61
61
62
62
63
class NoCommitizenFoundException (CommitizenException ):
You can’t perform that action at this time.
0 commit comments