diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2021-02-08 10:05:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-08 10:05:14 -0700 |
commit | d7d9d7ba33d6486dff1a8cc1c55ed542e0bfb47e (patch) | |
tree | cf96f05edaf2729bf500455c3a678ac6c785bd20 /doc | |
parent | 8eff1f6a2fed8d9df52750271f4e07dc4ea5e1bf (diff) | |
parent | 53496cdf82d6c9a3ddb40c12746d3257d9e09396 (diff) | |
download | numpy-d7d9d7ba33d6486dff1a8cc1c55ed542e0bfb47e.tar.gz |
Merge pull request #18322 from BvB93/plugin-precision
ENH: Add a mypy plugin for exposing platform-specific extended-precision types
Diffstat (limited to 'doc')
-rw-r--r-- | doc/release/upcoming_changes/18322.new_feature.rst | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/release/upcoming_changes/18322.new_feature.rst b/doc/release/upcoming_changes/18322.new_feature.rst new file mode 100644 index 000000000..5330b9a97 --- /dev/null +++ b/doc/release/upcoming_changes/18322.new_feature.rst @@ -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 |