summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorBas van Beek <43369155+BvB93@users.noreply.github.com>2021-06-18 13:11:38 +0200
committerBas van Beek <43369155+BvB93@users.noreply.github.com>2021-06-18 13:24:22 +0200
commitc3e92fbbfd6bae5eb7f6441ea0a7610703fdd034 (patch)
treec0b8877f339fba59235f37f5fc68ed74f0ac61b4 /numpy
parent2d3205fffc7d9d80c0004c2230969a0f7aae61f6 (diff)
downloadnumpy-c3e92fbbfd6bae5eb7f6441ea0a7610703fdd034.tar.gz
ENH: Use the concrete `MappingProxyType` class over the `Mapping` ABC
Diffstat (limited to 'numpy')
-rw-r--r--numpy/__init__.pyi6
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/__init__.pyi b/numpy/__init__.pyi
index bcdf6f8f8..47a8f2419 100644
--- a/numpy/__init__.pyi
+++ b/numpy/__init__.pyi
@@ -5,7 +5,7 @@ import mmap
import array as _array
import datetime as dt
from abc import abstractmethod
-from types import TracebackType
+from types import TracebackType, MappingProxyType
from contextlib import ContextDecorator
from numpy.core._internal import _ctypes
@@ -1082,7 +1082,7 @@ class dtype(Generic[_DTypeScalar_co]):
@property
def fields(
self,
- ) -> None | Mapping[str, Tuple[dtype[Any], int] | Tuple[dtype[Any], int, Any]]: ...
+ ) -> None | MappingProxyType[str, Tuple[dtype[Any], int] | Tuple[dtype[Any], int, Any]]: ...
@property
def flags(self) -> int: ...
@property
@@ -1098,7 +1098,7 @@ class dtype(Generic[_DTypeScalar_co]):
@property
def kind(self) -> str: ...
@property
- def metadata(self) -> None | Mapping[str, Any]: ...
+ def metadata(self) -> None | MappingProxyType[str, Any]: ...
@property
def name(self) -> str: ...
@property