Skip to content

Commit a0379a2

Browse files
committed
chore(generator refact): refactor the main decision structure
1 parent 5ea0ed9 commit a0379a2

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

generator.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,18 @@
2121
try:
2222
config = safe_load(stream)
2323
tag, tag_is_capitalized, tag_is_lowercase, tag_is_uppercase, convention = run_config(config, tag, tag_is_capitalized, tag_is_lowercase, tag_is_uppercase, convention)
24-
if convention != '' or convention != 'custom':
25-
if convention == 'angular':
26-
print('You are using the %s convention' % convention)
27-
angular_convention()
28-
elif convention == 'changelog':
29-
print('You are using the %s convention' % convention)
30-
changelog_convention()
31-
elif convention == 'symphony':
32-
print('You are using the %s convention' % convention)
33-
symphony_convention()
34-
elif convention == 'none':
35-
just_message()
36-
else:
24+
if convention == 'angular':
25+
print('You are using the %s convention' % convention)
26+
angular_convention()
27+
elif convention == 'changelog':
28+
print('You are using the %s convention' % convention)
29+
changelog_convention()
30+
elif convention == 'symphony':
31+
print('You are using the %s convention' % convention)
32+
symphony_convention()
33+
elif convention == 'none':
34+
just_message()
35+
elif convention == 'custom':
3736
custom_convention()
3837
except YAMLError as exc:
3938
print(exc)

0 commit comments

Comments
 (0)