docs: Add a warning about editing mypy stubs and the daemon.

This commit is contained in:
Tim Abbott 2018-12-17 10:27:51 -08:00
parent 7a44d99b96
commit 612e70a64b
2 changed files with 6 additions and 0 deletions

View File

@ -95,6 +95,10 @@ everything in the third-party module as an `Any`, which is the right
model (one certainly wouldn't want to need stubs for everything just model (one certainly wouldn't want to need stubs for everything just
to use `mypy`!), but means the code can't be fully type-checked. to use `mypy`!), but means the code can't be fully type-checked.
**Note**: When editing stubs, we recommend using
`tools/run-mypy --no-daemon`, because the mypy daemon's caching
system has some bugs around editing stubs that can be confusing.
## `type_debug.py` ## `type_debug.py`
`zerver/lib/type_debug.py` has a useful decorator `print_types`. It `zerver/lib/type_debug.py` has a useful decorator `print_types`. It

View File

@ -2,6 +2,8 @@
# Logistics of what code to check and how to handle the data. # Logistics of what code to check and how to handle the data.
scripts_are_modules = True scripts_are_modules = True
show_traceback = True show_traceback = True
# See https://zulip.readthedocs.io/en/latest/testing/mypy.html#mypy-stubs-for-third-party-modules
# for notes on how we manage mypy stubs.
mypy_path = stubs/ mypy_path = stubs/
cache_dir = var/mypy-cache cache_dir = var/mypy-cache