mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
mypy: Move configuration to pyproject.toml.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
19ee45ccc4
commit
0ae94c6051
@@ -192,7 +192,7 @@ highlighting. The system is largely managed by the code in
|
||||
* **Mypy type checker**. Because we're using mypy in a strict mode,
|
||||
when you add use of a new Python dependency, you usually need to
|
||||
either adds stubs to the `stubs/` directory for the library, or edit
|
||||
`mypy.ini` in the root of the Zulip project to configure
|
||||
`pyproject.toml` in the root of the Zulip project to configure
|
||||
`ignore_missing_imports` for the new library. See
|
||||
[our mypy docs][mypy-docs] for more details.
|
||||
|
||||
|
||||
@@ -98,14 +98,14 @@ basically the equivalent of C header files defining the types used in
|
||||
these Python APIs.
|
||||
|
||||
For other third-party modules that we call from Zulip, one either
|
||||
needs to add an `ignore_missing_imports` entry in `mypy.ini` in the
|
||||
needs to add an `ignore_missing_imports` entry in `pyproject.toml` in the
|
||||
root of the project, letting `mypy` know that it's third-party code,
|
||||
or add type stubs to the `stubs/` directory, which has type stubs that
|
||||
mypy can use to type-check calls into that third-party module.
|
||||
|
||||
It's easy to add new stubs! Just read the docs, look at some of
|
||||
existing examples to see how they work, and remember to remove the
|
||||
`ignore_missing_imports` entry in `mypy.ini` when you add them.
|
||||
`ignore_missing_imports` entry in `pyproject.toml` when you add them.
|
||||
|
||||
For any third-party modules that don't have stubs, `mypy` treats
|
||||
everything in the third-party module as an `Any`, which is the right
|
||||
|
||||
Reference in New Issue
Block a user