mypy: Use the new --fast-parser option.

This makes mypy about 15% faster running on the Zulip codebase (from
7s=>6s on my laptop), which seems worth it for losing a couple files.

This option requires a new dependency, which we add to the
mypy-specific requirements.txt file.
This commit is contained in:
Tim Abbott
2016-05-05 13:28:48 -07:00
parent 1807e855e7
commit b21454d05e
2 changed files with 4 additions and 1 deletions

View File

@@ -1,2 +1,3 @@
six==1.10.0
git+https://github.com/python/mypy.git@9bb5f2e0ebc90aac5d948d1a7ebbb1f5003dca8e
typed-ast==0.5.1

View File

@@ -21,7 +21,9 @@ tools/deprecated/
zproject/
zerver/lib/actions.py
zerver/lib/bugdown/fenced_code.py
zerver/lib/rate_limiter.py
zerver/lib/statistics.py
zerver/middleware.py
zerver/migrations/
zerver/tests/
zerver/views/webhooks/jira.py
@@ -53,7 +55,7 @@ else:
mypy_command = "mypy"
if python_files:
rc = subprocess.call([mypy_command, "--silent-imports", "--py2", "--check-untyped-defs"] + python_files)
rc = subprocess.call([mypy_command, "--fast-parser", "--silent-imports", "--py2", "--check-untyped-defs"] + python_files)
if not rc:
print("The mypy static type checker for python detected no errors!")
else: