mypy: Extract default run-mypy options into mypy.ini.

This commit is contained in:
neiljp (Neil Pilgrim) 2018-03-23 20:32:12 +00:00 committed by Tim Abbott
parent fb4f5c8570
commit 9a49812cde
2 changed files with 7 additions and 6 deletions

View File

@ -1,6 +1,11 @@
[mypy] [mypy]
check_untyped_defs = True
disallow_any_generics = True
strict_optional = True strict_optional = True
scripts_are_modules = True
show_traceback = True
# REQ returning None issue # REQ returning None issue
[mypy-zerver.decorator] [mypy-zerver.decorator]

View File

@ -83,12 +83,8 @@ if not python_files and not pyi_files:
print("There are no files to run mypy on.") print("There are no files to run mypy on.")
sys.exit(0) sys.exit(0)
extra_args = ["--check-untyped-defs", extra_args = ["--follow-imports=silent",
"--follow-imports=silent", "-i", "--cache-dir=var/mypy-cache"]
"--scripts-are-modules",
"--show-traceback",
"-i", "--cache-dir=var/mypy-cache",
"--disallow-any-generics"]
if args.linecoverage_report: if args.linecoverage_report:
extra_args.append("--linecoverage-report") extra_args.append("--linecoverage-report")
extra_args.append("var/linecoverage-report") extra_args.append("var/linecoverage-report")