mirror of https://github.com/zulip/zulip.git
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.
This commit is contained in:
parent
8c50f7f8a3
commit
6697e3620b
|
@ -25,31 +25,29 @@ zproject/test_settings.py
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description="Run mypy on files tracked by git.")
|
parser = argparse.ArgumentParser(description="Run mypy on files tracked by git.")
|
||||||
parser.add_argument('targets', nargs='*',
|
parser.add_argument('targets', nargs='*',
|
||||||
help="""files and directories to include in the result.
|
help="files and directories to check (default: .)")
|
||||||
If this is not specified, the current directory is used""")
|
|
||||||
parser.add_argument('-m', '--modified', action='store_true',
|
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',
|
parser.add_argument('-a', '--all', action='store_true',
|
||||||
help="""run mypy on all python files, ignoring the exclude list.
|
help="check all files, bypassing the default exclude list")
|
||||||
This is useful if you have to find out which files fail mypy check.""")
|
|
||||||
parser.add_argument('--linecoverage-report', action='store_true',
|
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',
|
parser.add_argument('--no-disallow-untyped-defs',
|
||||||
dest='disallow_untyped_defs', action='store_false',
|
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',
|
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',
|
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',
|
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',
|
parser.add_argument('--no-ignore-missing-imports',
|
||||||
dest='ignore_missing_imports', action='store_false',
|
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',
|
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",
|
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()
|
args = parser.parse_args()
|
||||||
|
|
||||||
if not args.force:
|
if not args.force:
|
||||||
|
|
Loading…
Reference in New Issue