Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 13eb563

Browse filesBrowse files
committed
DOC: Add development release note and note to add type hints into coding guide
1 parent ef5713e commit 13eb563
Copy full SHA for 13eb563

File tree

Expand file treeCollapse file tree

2 files changed

+23
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+23
-0
lines changed
+18Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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``).

‎doc/devel/coding_guide.rst

Copy file name to clipboardExpand all lines: doc/devel/coding_guide.rst
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.