File tree Expand file tree Collapse file tree
api/next_api_changes/development Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ Provisional support for PEP484 Type Hint Annotations
2+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+ New public API should be type hinted in ``.pyi `` stub files (except ``pyplot `` and tests
5+ which are typed in-line).
6+ Tests should be type hinted minimally, essentially only when ``mypy `` generates errors.
7+
8+ CI and configuration for running ``mypy `` have been added.
9+
10+
11+ Generation of ``pyplot.py `` requires ``black ``
12+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13+
14+ The autogenerated portions of ``pyplot.py `` use ``black `` autoformatting to ensure
15+ syntax-correct, readable output code.
16+
17+ As such ``black `` is now a development and test requirement (for the test which
18+ regenerates ``pyplot ``).
Original file line number Diff line number Diff line change @@ -82,6 +82,11 @@ rules before submitting a pull request:
8282 by the contributor's initials. (see :file: `doc/api/api_changes.rst ` for more
8383 information)
8484
85+ * If you add new public API or change public API, update or add the
86+ corresponding type hints. Most often this is found in the corresponding
87+ ``.pyi `` file for the ``.py `` file which was edited. Changes in ``pyplot.py ``
88+ are type hinted inline.
89+
8590* See below for additional points about :ref: `keyword-argument-processing `, if
8691 applicable for your pull request.
8792
You can’t perform that action at this time.
0 commit comments