diff options
author | pmav99 <pmav99@users.noreply.github.com> | 2021-01-19 16:31:04 +0200 |
---|---|---|
committer | Panos Mavrogiorgos <pmav99@gmail.com> | 2021-01-19 15:35:49 +0100 |
commit | 8b8bbdfa5b5331811841176f64470521a890a7c0 (patch) | |
tree | 16c71cc5e52be6f7c8d5e7fbffd30ef8899f21c1 | |
parent | af8e67c4fd368bae710b01f32611b10dfab02b61 (diff) | |
download | numpy-8b8bbdfa5b5331811841176f64470521a890a7c0.tar.gz |
STY: Use explicit reexports for numpy.typing objects
`mypy --strict` is disabling `implicit_reexport`. Consequently, when we try to
import `ArrayLike` and `DTypeLike` from `numpy.typing`, mypy throws an error.
With this commit we add explicit "reexports" for these two objects.
Fixes #18190
-rw-r--r-- | numpy/typing/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/typing/__init__.py b/numpy/typing/__init__.py index 86bba57be..47dbe4fbe 100644 --- a/numpy/typing/__init__.py +++ b/numpy/typing/__init__.py @@ -295,9 +295,9 @@ from ._scalars import ( _VoidLike, ) from ._shape import _Shape, _ShapeLike -from ._dtype_like import _SupportsDType, _VoidDTypeLike, DTypeLike +from ._dtype_like import _SupportsDType, _VoidDTypeLike, DTypeLike as DTypeLike from ._array_like import ( - ArrayLike, + ArrayLike as ArrayLike, _ArrayLike, _NestedSequence, _SupportsArray, |