mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 16:14:02 +00:00
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:
@@ -1,2 +1,3 @@
|
||||
six==1.10.0
|
||||
git+https://github.com/python/mypy.git@9bb5f2e0ebc90aac5d948d1a7ebbb1f5003dca8e
|
||||
typed-ast==0.5.1
|
||||
|
@@ -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:
|
||||
|
Reference in New Issue
Block a user