Skip to content

Commit 06e654a

Browse files
committed
chore(convention helper): fixed bugs making impossible to get help
1 parent db39415 commit 06e654a

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

commit_helper/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def main():
2020

2121
debug('file_path', file_path, debug_mode)
2222

23-
if args.show_convention_tags is not '':
23+
if args.show_convention_tags is True:
2424
convention_help_handler(file_path, args, debug_mode)
2525
return
2626

commit_helper/conventions/convention_help_handler.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# TODO: test
2020
def convention_help_handler(file_path, args, debug_mode):
2121
if file_path.is_file() and args.convention is '':
22-
debug('Found file', str(file_path), debug_mode)
22+
debug('Found file for help', str(file_path), debug_mode)
2323
with open(str(file_path)) as target:
2424
try:
2525
config = safe_load(target)
@@ -36,24 +36,26 @@ def convention_help_handler(file_path, args, debug_mode):
3636
print(MIN_ERROR + 'No convention was specified!' + RESET)
3737
return
3838

39-
get_help_to_defined_convention(convention)
39+
debug('convention captured for helper', convention, debug_mode)
40+
get_help_to_defined_convention(convention, debug_mode)
4041

4142

4243
# TODO: test
43-
def get_help_to_defined_convention(convention):
44-
if convention is 'angular':
44+
def get_help_to_defined_convention(convention, debug_mode):
45+
debug('recieved convention for help catch', convention, debug_mode)
46+
if convention == 'angular':
4547
print_help(angular_convention_help)
4648

47-
elif convention is 'tagged':
49+
elif convention == 'tagged':
4850
print_help(tagged_convention_help)
4951

50-
elif convention is 'karma':
52+
elif convention == 'karma':
5153
print_help(karma_convention_help)
5254

53-
elif convention is 'symphony':
55+
elif convention == 'symphony':
5456
print_help(symphony_convention_help)
5557

56-
elif convention is 'atom':
58+
elif convention == 'atom':
5759
print_help(atom_convention_help)
5860

5961
else:

commit_helper/utils/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def parser_cli():
7070
help='Toggles debug option')
7171

7272
parser.add_argument('-s', '--show', dest='show_convention_tags',
73-
choices=supported_conventions, default='',
73+
default='False', action='store_true',
7474
help='Shows the rules of a given convention')
7575

7676
return parser

0 commit comments

Comments
 (0)