@@ -62,8 +62,7 @@ class Settings(TypedDict, total=False):
6262 extras : dict [str , Any ]
6363
6464
65- name : str = "cz_conventional_commits"
66- config_files : list [str ] = [
65+ CONFIG_FILES : list [str ] = [
6766 "pyproject.toml" ,
6867 ".cz.toml" ,
6968 ".cz.json" ,
@@ -72,10 +71,10 @@ class Settings(TypedDict, total=False):
7271 "cz.yaml" ,
7372 "cz.toml" ,
7473]
75- encoding : str = "utf-8"
74+ ENCODING = "utf-8"
7675
7776DEFAULT_SETTINGS : Settings = {
78- "name" : name ,
77+ "name" : "cz_conventional_commits" ,
7978 "version" : None ,
8079 "version_files" : [],
8180 "version_provider" : "commitizen" ,
@@ -104,7 +103,7 @@ class Settings(TypedDict, total=False):
104103 "pre_bump_hooks" : [],
105104 "post_bump_hooks" : [],
106105 "prerelease_offset" : 0 ,
107- "encoding" : encoding ,
106+ "encoding" : ENCODING ,
108107 "always_signoff" : False ,
109108 "template" : None , # default provided by plugin
110109 "extras" : {},
@@ -113,7 +112,7 @@ class Settings(TypedDict, total=False):
113112CHANGELOG_FORMAT = "markdown"
114113
115114BUMP_PATTERN = r"^((BREAKING[\-\ ]CHANGE|\w+)(\(.+\))?!?):"
116- BUMP_MAP = dict (
115+ BUMP_MAP = OrderedDict (
117116 (
118117 (r"^.+!$" , str (SemVerIncrement .MAJOR )),
119118 (r"^BREAKING[\-\ ]CHANGE" , str (SemVerIncrement .MAJOR )),
@@ -123,7 +122,7 @@ class Settings(TypedDict, total=False):
123122 (r"^perf" , str (SemVerIncrement .PATCH )),
124123 )
125124)
126- BUMP_MAP_MAJOR_VERSION_ZERO = dict (
125+ BUMP_MAP_MAJOR_VERSION_ZERO = OrderedDict (
127126 (
128127 (r"^.+!$" , str (SemVerIncrement .MINOR )),
129128 (r"^BREAKING[\-\ ]CHANGE" , str (SemVerIncrement .MINOR )),
@@ -133,8 +132,8 @@ class Settings(TypedDict, total=False):
133132 (r"^perf" , str (SemVerIncrement .PATCH )),
134133 )
135134)
136- change_type_order = ["BREAKING CHANGE" , "Feat" , "Fix" , "Refactor" , "Perf" ]
137- bump_message = "bump: version $current_version → $new_version"
135+ CHANGE_TYPE_ORDER = ["BREAKING CHANGE" , "Feat" , "Fix" , "Refactor" , "Perf" ]
136+ BUMP_MESSAGE = "bump: version $current_version → $new_version"
138137
139138
140139def get_tag_regexes (
0 commit comments