From 6697e3620bbcb8b044a04c5ca59964ca5ec16a6a Mon Sep 17 00:00:00 2001 From: Greg Price Date: Tue, 26 Sep 2017 14:28:10 -0700 Subject: [PATCH] run-mypy: Give CLI option help a consistent style. Most CLI tools (including GNU tools and Mercurial) use lowercase sentence fragments, with no period, for option glosses, so we follow that style. Also make the voice and wording consistent, and the quote type in the Python source. --- tools/run-mypy | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/tools/run-mypy b/tools/run-mypy index 3056519790..7a306e6d3c 100755 --- a/tools/run-mypy +++ b/tools/run-mypy @@ -25,31 +25,29 @@ zproject/test_settings.py parser = argparse.ArgumentParser(description="Run mypy on files tracked by git.") parser.add_argument('targets', nargs='*', - help="""files and directories to include in the result. - If this is not specified, the current directory is used""") + help="files and directories to check (default: .)") parser.add_argument('-m', '--modified', action='store_true', - help='list only modified files') + help="check only modified files") parser.add_argument('-a', '--all', action='store_true', - help="""run mypy on all python files, ignoring the exclude list. - This is useful if you have to find out which files fail mypy check.""") + help="check all files, bypassing the default exclude list") parser.add_argument('--linecoverage-report', action='store_true', - help="""run the linecoverage report to see annotation coverage""") + help="emit a coverage report under var/") parser.add_argument('--no-disallow-untyped-defs', dest='disallow_untyped_defs', action='store_false', - help="""Don't throw errors when functions are not annotated""") + help="don't pass --disallow-untyped-defs to mypy") parser.add_argument('--scripts-only', action='store_true', - help="""Only type check extensionless python scripts""") + help="only check extensionless python scripts") parser.add_argument('--strict-optional', action='store_true', - help="""Use the --strict-optional flag with mypy""") + help="pass --strict-optional to mypy") parser.add_argument('--warn-unused-ignores', action='store_true', - help="""Use the --warn-unused-ignores flag with mypy""") + help="pass --warn-unused-ignores to mypy") parser.add_argument('--no-ignore-missing-imports', dest='ignore_missing_imports', action='store_false', - help="""Don't use the --ignore-missing-imports flag with mypy""") + help="don't pass --ignore-missing-imports to mypy") parser.add_argument('--quick', action='store_true', - help="""Use the --quick flag with mypy""") + help="pass --quick to mypy") parser.add_argument('--force', action="store_true", - help='Run tests despite possible provisioning problems.') + help="run tests despite possible provisioning problems") args = parser.parse_args() if not args.force: