From 9a49812cde68e9475ca4f391e3b9a0f8cd7e6f62 Mon Sep 17 00:00:00 2001 From: "neiljp (Neil Pilgrim)" Date: Fri, 23 Mar 2018 20:32:12 +0000 Subject: [PATCH] mypy: Extract default run-mypy options into mypy.ini. --- mypy.ini | 5 +++++ tools/run-mypy | 8 ++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/mypy.ini b/mypy.ini index 2d222ecfb4..defb974d1f 100644 --- a/mypy.ini +++ b/mypy.ini @@ -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] diff --git a/tools/run-mypy b/tools/run-mypy index eceeb0feb6..3732d45101 100755 --- a/tools/run-mypy +++ b/tools/run-mypy @@ -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")