mypy: Move configuration to pyproject.toml.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-07-05 14:36:46 -07:00
committed by Tim Abbott
parent 19ee45ccc4
commit 0ae94c6051
5 changed files with 45 additions and 44 deletions

View File

@@ -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.

View File

@@ -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