Skip to content

Commit 093eb23

Browse files
refactor(bump.py): use MAJOR, MINOR, and PATCH from defaults.py
1 parent 69c90ab commit 093eb23

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

commitizen/bump.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from collections import OrderedDict
66
from string import Template
77

8-
from commitizen.defaults import bump_message, encoding
8+
from commitizen.defaults import MAJOR, MINOR, PATCH, bump_message, encoding
99
from commitizen.exceptions import CurrentVersionNotFoundError
1010
from commitizen.git import GitCommit, smart_open
1111
from commitizen.version_schemes import DEFAULT_SCHEME, Version, VersionScheme
@@ -34,11 +34,11 @@ def find_increment(
3434
new_increment = increments_map[match_pattern]
3535
break
3636

37-
if increment == "MAJOR":
37+
if increment == MAJOR:
3838
break
39-
elif increment == "MINOR" and new_increment == "MAJOR":
39+
elif increment == MINOR and new_increment == MAJOR:
4040
increment = new_increment
41-
elif increment == "PATCH" or increment is None:
41+
elif increment == PATCH or increment is None:
4242
increment = new_increment
4343

4444
return increment

0 commit comments

Comments
 (0)