mirror of https://github.com/zulip/zulip.git
docs: Add a warning about editing mypy stubs and the daemon.
This commit is contained in:
parent
7a44d99b96
commit
612e70a64b
|
@ -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
|
||||||
|
|
2
mypy.ini
2
mypy.ini
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue