Skip to content

Commit

Permalink
mypy: Extract default run-mypy options into mypy.ini.
Browse files Browse the repository at this point in the history
  • Loading branch information
neiljp authored and timabbott committed Mar 23, 2018
1 parent fb4f5c8 commit 9a49812
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 5 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
[mypy]
check_untyped_defs = True
disallow_any_generics = True
strict_optional = True

scripts_are_modules = True
show_traceback = True

# REQ returning None issue

[mypy-zerver.decorator]
Expand Down
8 changes: 2 additions & 6 deletions tools/run-mypy
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,8 @@ if not python_files and not pyi_files:
print("There are no files to run mypy on.")
sys.exit(0)

extra_args = ["--check-untyped-defs",
"--follow-imports=silent",
"--scripts-are-modules",
"--show-traceback",
"-i", "--cache-dir=var/mypy-cache",
"--disallow-any-generics"]
extra_args = ["--follow-imports=silent",
"-i", "--cache-dir=var/mypy-cache"]
if args.linecoverage_report:
extra_args.append("--linecoverage-report")
extra_args.append("var/linecoverage-report")
Expand Down

0 comments on commit 9a49812

Please sign in to comment.