diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2021-05-28 14:11:55 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-28 14:11:55 -0600 |
commit | 336cda183332006ce57750af6b14642a79e3b3f4 (patch) | |
tree | a83a909b421e771b97c9332289a1e975efc079cc /numpy/typing/tests/test_typing.py | |
parent | ca2880476f2f0f9ff3ba4ca0889ac9911727be9b (diff) | |
parent | f5a5fdb345d3d9be90b2bc6832dc6bd0fe66aa5d (diff) | |
download | numpy-336cda183332006ce57750af6b14642a79e3b3f4.tar.gz |
Merge pull request #19062 from BvB93/ctypes-plugin
ENH: Add a mypy plugin for inferring the precision of `np.ctypeslib.c_intp`
Diffstat (limited to 'numpy/typing/tests/test_typing.py')
-rw-r--r-- | numpy/typing/tests/test_typing.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/numpy/typing/tests/test_typing.py b/numpy/typing/tests/test_typing.py index be08c1359..35558c880 100644 --- a/numpy/typing/tests/test_typing.py +++ b/numpy/typing/tests/test_typing.py @@ -8,7 +8,11 @@ from typing import Optional, IO, Dict, List import pytest import numpy as np -from numpy.typing.mypy_plugin import _PRECISION_DICT, _EXTENDED_PRECISION_LIST +from numpy.typing.mypy_plugin import ( + _PRECISION_DICT, + _EXTENDED_PRECISION_LIST, + _C_INTP, +) try: from mypy import api @@ -219,6 +223,9 @@ def _construct_format_dict(): # numpy.typing "_NBitInt": dct['_NBitInt'], + + # numpy.ctypeslib + "c_intp": f"ctypes.{_C_INTP}" } |