mirror of https://github.com/zulip/zulip.git
mypy: Add flag to warn for unused ignores.
This commit is contained in:
parent
d7766d7b6e
commit
27e1891706
|
@ -54,6 +54,8 @@ parser.add_argument('--scripts-only', dest='scripts_only', action='store_true',
|
||||||
help="""Only type check extensionless python scripts""")
|
help="""Only type check extensionless python scripts""")
|
||||||
parser.add_argument('--strict-optional', dest='strict_optional', action='store_true', default=False,
|
parser.add_argument('--strict-optional', dest='strict_optional', action='store_true', default=False,
|
||||||
help="""Use the --strict-optional flag with mypy""")
|
help="""Use the --strict-optional flag with mypy""")
|
||||||
|
parser.add_argument('--warn-unused-ignores', dest='warn_unused_ignores', action='store_true', default=False,
|
||||||
|
help="""Use the --warn-unused-ignores flag with mypy""")
|
||||||
parser.add_argument('--no-ignore-missing-imports', dest='ignore_missing_imports', action='store_false', default=True,
|
parser.add_argument('--no-ignore-missing-imports', dest='ignore_missing_imports', action='store_false', default=True,
|
||||||
help="""Don't use the --ignore-missing-imports flag with mypy""")
|
help="""Don't use the --ignore-missing-imports flag with mypy""")
|
||||||
parser.add_argument('--quick', action='store_true', default=False,
|
parser.add_argument('--quick', action='store_true', default=False,
|
||||||
|
@ -108,6 +110,8 @@ if args.linecoverage_report:
|
||||||
extra_args.append("var/linecoverage-report")
|
extra_args.append("var/linecoverage-report")
|
||||||
if args.disallow_untyped_defs:
|
if args.disallow_untyped_defs:
|
||||||
extra_args.append("--disallow-untyped-defs")
|
extra_args.append("--disallow-untyped-defs")
|
||||||
|
if args.warn_unused_ignores:
|
||||||
|
extra_args.append("--warn-unused-ignores")
|
||||||
if args.strict_optional:
|
if args.strict_optional:
|
||||||
extra_args.append("--strict-optional")
|
extra_args.append("--strict-optional")
|
||||||
if args.ignore_missing_imports:
|
if args.ignore_missing_imports:
|
||||||
|
|
Loading…
Reference in New Issue