tools: Move strict-optional to mypy.ini & remove option from run-mypy.

This commit is contained in:
neiljp (Neil Pilgrim) 2018-03-30 23:03:02 -07:00 committed by showell
parent 6cbe1f5ba7
commit 7dc0703397
2 changed files with 1 additions and 4 deletions

View file

@ -1,6 +1,7 @@
[mypy] [mypy]
check_untyped_defs = True check_untyped_defs = True
disallow_any_generics = True disallow_any_generics = True
strict_optional = True
incremental = True incremental = True
scripts_are_modules = True scripts_are_modules = True

View file

@ -110,8 +110,6 @@ parser.add_argument('--no-disallow-untyped-defs', dest='disallow_untyped_defs',
help="""Don't throw errors when functions are not annotated""") help="""Don't throw errors when functions are not annotated""")
parser.add_argument('--scripts-only', dest='scripts_only', action='store_true', default=False, parser.add_argument('--scripts-only', dest='scripts_only', action='store_true', default=False,
help="""Only type check extensionless python scripts""") help="""Only type check extensionless python scripts""")
parser.add_argument('--no-strict-optional', dest='strict_optional', action='store_false', default=True,
help="""Don't use the --strict-optional flag with mypy""")
parser.add_argument('--warn-unused-ignores', dest='warn_unused_ignores', action='store_true', default=False, parser.add_argument('--warn-unused-ignores', dest='warn_unused_ignores', action='store_true', default=False,
help="""Use the --warn-unused-ignores flag with mypy""") 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,
@ -154,8 +152,6 @@ if args.disallow_untyped_defs:
extra_args.append("--disallow-untyped-defs") extra_args.append("--disallow-untyped-defs")
if args.warn_unused_ignores: if args.warn_unused_ignores:
extra_args.append("--warn-unused-ignores") extra_args.append("--warn-unused-ignores")
if args.strict_optional:
extra_args.append("--strict-optional")
if args.ignore_missing_imports: if args.ignore_missing_imports:
extra_args.append("--ignore-missing-imports") extra_args.append("--ignore-missing-imports")
if args.quick: if args.quick: