From 858a4cc900fd0da9549b0cf227041b0d6bb91f6f Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 2 Nov 2020 21:50:53 -0800 Subject: commands: show usage on empty command --- fatcat_scholar/issue_db.py | 2 +- fatcat_scholar/sim_pipeline.py | 2 +- fatcat_scholar/transform.py | 2 +- fatcat_scholar/work_pipeline.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'fatcat_scholar') diff --git a/fatcat_scholar/issue_db.py b/fatcat_scholar/issue_db.py index 9839a60..bf79b09 100644 --- a/fatcat_scholar/issue_db.py +++ b/fatcat_scholar/issue_db.py @@ -419,7 +419,7 @@ def main() -> None: args = parser.parse_args() if not args.__dict__.get("func"): - print("tell me what to do! (try --help)") + parser.print_help(file=sys.stderr) sys.exit(-1) idb = IssueDB(args.db_file) diff --git a/fatcat_scholar/sim_pipeline.py b/fatcat_scholar/sim_pipeline.py index 47a3e22..926d943 100644 --- a/fatcat_scholar/sim_pipeline.py +++ b/fatcat_scholar/sim_pipeline.py @@ -191,7 +191,7 @@ def main() -> None: args = parser.parse_args() if not args.__dict__.get("func"): - print("tell me what to do! (try --help)") + parser.print_help(file=sys.stderr) sys.exit(-1) sp = SimPipeline(issue_db=IssueDB(args.issue_db_file)) diff --git a/fatcat_scholar/transform.py b/fatcat_scholar/transform.py index 8ba8b2a..10382af 100644 --- a/fatcat_scholar/transform.py +++ b/fatcat_scholar/transform.py @@ -697,7 +697,7 @@ def main() -> None: args = parser.parse_args() if not args.__dict__.get("func"): - print("tell me what to do! (try --help)") + parser.print_help(file=sys.stderr) sys.exit(-1) if args.func == "run_transform": diff --git a/fatcat_scholar/work_pipeline.py b/fatcat_scholar/work_pipeline.py index d4bd2fb..631bda8 100644 --- a/fatcat_scholar/work_pipeline.py +++ b/fatcat_scholar/work_pipeline.py @@ -417,7 +417,7 @@ def main() -> None: args = parser.parse_args() if not args.__dict__.get("func"): - print("tell me what to do! (try --help)") + parser.print_help(file=sys.stderr) sys.exit(-1) wp = WorkPipeline( -- cgit v1.2.3