Skip to content

Commit 065ab83

Browse files
committed
🎨调整help命令输出信息
1 parent e67f643 commit 065ab83

File tree

2 files changed

+3
-26
lines changed

2 files changed

+3
-26
lines changed

client/codepuppy.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,8 @@ def main(self):
125125
'''输出帮助文档'''
126126
CmdArgParser.print_help()
127127

128-
# elif args.show_help:
129-
# CmdArgParser.print_help()
130-
131128
else:
132-
print('输入命令有误,请输入 -h 命令查看帮助文档!')
129+
CmdArgParser.print_help()
133130

134131

135132
if __name__ == "__main__":

client/node/common/cmdarg.py

+2-22
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def parse_args():
2929
argparser = argparse.ArgumentParser(add_help=True)
3030
argparser.add_argument('-v', '--version', action='version',
3131
version=f"CodeAnalysis Version {settings.VERSION}({settings.EDITION.name} Beta)",
32-
help="显示当前版本号")
32+
help="显示版本号")
3333
argparser.add_argument("-l", "--log-file", dest='log_file', help="指定log文件路径")
3434
subparsers = argparser.add_subparsers(dest='command', help="Commands")
3535

@@ -84,24 +84,4 @@ def print_help():
8484
输出帮助文档
8585
:return:
8686
"""
87-
cnt = 50
88-
print("")
89-
print("-" * cnt)
90-
print("欢迎使用 Tencent Cloud Code Analysis - 腾讯云代码分析")
91-
print("-" * cnt)
92-
print("")
93-
94-
print("执行代码分析命令: localscan")
95-
print("-" * cnt)
96-
print("1. 使用配置文件启动")
97-
print("(1) 填写默认配置文件codedog.ini(必填字段:token、source_dir)")
98-
print("(2) python3 codepuppy.py localscan")
99-
print("2. 纯命令行启动")
100-
print("python3 codepuppy.py localscan -t <个人token> -s <本地代码目录>")
101-
print("")
102-
103-
print("查看帮助信息")
104-
print("-"*cnt)
105-
print("help 显示当前帮助信息")
106-
print("<command> -h,--help 显示子命令帮助信息")
107-
print("")
87+
print("请输入-h/--help参数,查看帮助文档。")

0 commit comments

Comments
 (0)