Skip to content

Commit

Permalink
REL: Add a release note for the mypy plugin update
Browse files Browse the repository at this point in the history
  • Loading branch information
Bas van Beek committed Feb 5, 2021
1 parent cff4ec0 commit 53496cd
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions doc/release/upcoming_changes/18322.new_feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Let the mypy plugin manage extended-precision `numpy.number` subclasses
-----------------------------------------------------------------------

The mypy_ plugin, introduced in `numpy/numpy#17843`_, has been expanded:
the plugin now removes annotations for platform-specific extended-precision
types that are not available to the platform in question.
For example, it will remove `~numpy.float128` when not available.

Without the plugin *all* extended-precision types will, as far as mypy is concerned,
be available on all platforms.

To enable the plugin, one must add it to their mypy `configuration file`_:

.. code-block:: ini
[mypy]
plugins = numpy.typing.mypy_plugin
.. _mypy: http://mypy-lang.org/
.. _configuration file: https://mypy.readthedocs.io/en/stable/config_file.html
.. _`numpy/numpy#17843`: https://github.com/numpy/numpy/pull/17843

0 comments on commit 53496cd

Please sign in to comment.