Skip to content

Commit 305d19f

Browse files
committed
chore(refactoring): refactoration of main file calling
1 parent f5a4b48 commit 305d19f

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

commit_helper/__main__.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@
1919
from .utils.utils import gen_co_author
2020

2121

22-
def main(debug_mode=False):
22+
def main():
23+
parser = parser_cli()
24+
args = parser.parse_args()
25+
debug_mode = args.debug
26+
debug('args variable', args, debug_mode)
2327
file_path = Path('commiter.yml')
2428
debug('file_path', file_path, debug_mode)
2529
if file_path.is_file():
@@ -85,7 +89,5 @@ def main(debug_mode=False):
8589
parser.print_help()
8690

8791

88-
parser = parser_cli()
89-
args = parser.parse_args()
90-
debug('args variable', args, args.debug)
91-
main(args.debug)
92+
#
93+
# main(args.debug)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
packages=['commit_helper'],
77
entry_points={
88
'console_scripts': [
9-
'commit = commit_helper.__main__'
9+
'commit = commit_helper.__main__:main'
1010
]
1111
},
1212
install_requires=[

0 commit comments

Comments
 (0)