Skip to content

Commit 6e2d998

Browse files
AdrianDCLee-W
authored andcommitted
style: unify YAML quotes style
Signed-off-by: Adrian DC <radian.dc@gmail.com>
1 parent 69d32cf commit 6e2d998

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

docs/customization.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,13 @@ And the correspondent example for a yaml file:
110110
commitizen:
111111
name: cz_customize
112112
customize:
113-
message_template: "{{change_type}}:{% if show_message %} {{message}}{% endif %}"
113+
message_template: '{{change_type}}:{% if show_message %} {{message}}{% endif %}'
114114
example: 'feature: this feature enable customize through config file'
115-
schema: "<type>: <body>"
116-
schema_pattern: "(feature|bug fix):(\\s.*)"
117-
bump_pattern: "^(break|new|fix|hotfix)"
118-
commit_parser: "^(?P<change_type>feature|bug fix):\\s(?P<message>.*)?"
119-
changelog_pattern: "^(feature|bug fix)?(!)?"
115+
schema: '<type>: <body>'
116+
schema_pattern: '(feature|bug fix):(\\s.*)'
117+
bump_pattern: '^(break|new|fix|hotfix)'
118+
commit_parser: '^(?P<change_type>feature|bug fix):\\s(?P<message>.*)?'
119+
changelog_pattern: '^(feature|bug fix)?(!)?'
120120
change_type_map:
121121
feature: Feat
122122
bug fix: Fix
@@ -125,7 +125,7 @@ commitizen:
125125
new: MINOR
126126
fix: PATCH
127127
hotfix: PATCH
128-
change_type_order: ["BREAKING CHANGE", "feat", "fix", "refactor", "perf"]
128+
change_type_order: ['BREAKING CHANGE', 'feat', 'fix', 'refactor', 'perf']
129129
info_path: cz_customize_info.txt
130130
info: This is customized info
131131
questions:

tests/test_cz_customize.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,22 @@
110110
- commitizen/__version__.py
111111
- pyproject.toml
112112
customize:
113-
message_template: "{{change_type}}:{% if show_message %} {{message}}{% endif %}"
113+
message_template: '{{change_type}}:{% if show_message %} {{message}}{% endif %}'
114114
example: 'feature: this feature enables customization through a config file'
115-
schema: "<type>: <body>"
116-
schema_pattern: "(feature|bug fix):(\\s.*)"
117-
bump_pattern: "^(break|new|fix|hotfix)"
115+
schema: '<type>: <body>'
116+
schema_pattern: '(feature|bug fix):(\\s.*)'
117+
bump_pattern: '^(break|new|fix|hotfix)'
118+
commit_parser: '^(?P<change_type>feature|bug fix):\\s(?P<message>.*)?'
119+
changelog_pattern: '^(feature|bug fix)?(!)?'
120+
change_type_map:
121+
feature: Feat
122+
bug fix: Fix
118123
bump_map:
119124
break: MAJOR
120125
new: MINOR
121126
fix: PATCH
122127
hotfix: PATCH
123-
change_type_order: ["perf", "BREAKING CHANGE", "feat", "fix", "refactor"]
128+
change_type_order: ['perf', 'BREAKING CHANGE', 'feat', 'fix', 'refactor']
124129
info: This is a customized cz.
125130
questions:
126131
- type: list
@@ -326,6 +331,7 @@
326331
params=[
327332
TomlConfig(data=TOML_STR, path=Path("not_exist.toml")),
328333
JsonConfig(data=JSON_STR, path=Path("not_exist.json")),
334+
YAMLConfig(data=YAML_STR, path=Path("not_exist.yaml")),
329335
]
330336
)
331337
def config(request):

0 commit comments

Comments
 (0)