Skip to content

Commit f3ed157

Browse files
adam-grant-hendryLee-W
authored andcommitted
refactor(defaults.py): use variables in DEFAULT_SETTINGS
Map `"encoding"` and `"name"` to `encoding` and `name` variables, respectively (removes hard-coding of values).
1 parent 0ef12d5 commit f3ed157

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

commitizen/defaults.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class Settings(TypedDict, total=False):
7070
encoding: str = "utf-8"
7171

7272
DEFAULT_SETTINGS: Settings = {
73-
"name": "cz_conventional_commits",
73+
"name": name,
7474
"version": None,
7575
"version_files": [],
7676
"version_provider": "commitizen",
@@ -95,7 +95,7 @@ class Settings(TypedDict, total=False):
9595
"pre_bump_hooks": [],
9696
"post_bump_hooks": [],
9797
"prerelease_offset": 0,
98-
"encoding": "utf-8",
98+
"encoding": encoding,
9999
}
100100

101101
MAJOR = "MAJOR"

0 commit comments

Comments
 (0)