summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBas van Beek <b.f.van.beek@vu.nl>2021-05-24 14:52:47 +0200
committerBas van Beek <b.f.van.beek@vu.nl>2021-05-27 17:24:05 +0200
commitc646ab78d780a9bb06cdd8d7fba6b29092aa7507 (patch)
treed106aeddd5e4b3858082f3eb461f5c8736b2e3ad
parente2450d9e3d2711a78e0ff22a184edf0b2bca58d5 (diff)
downloadnumpy-c646ab78d780a9bb06cdd8d7fba6b29092aa7507.tar.gz
STY: Replace all `Any`-based runtime placeholders with `NotImplemented`
-rw-r--r--numpy/typing/_callable.py44
-rw-r--r--numpy/typing/_char_codes.py98
-rw-r--r--numpy/typing/_dtype_like.py4
3 files changed, 73 insertions, 73 deletions
diff --git a/numpy/typing/_callable.py b/numpy/typing/_callable.py
index bb39559f4..84fc2adb9 100644
--- a/numpy/typing/_callable.py
+++ b/numpy/typing/_callable.py
@@ -332,25 +332,25 @@ if TYPE_CHECKING or _HAS_TYPING_EXTENSIONS:
def __call__(self, __other: _T2) -> NDArray[bool_]: ...
else:
- _BoolOp = Any
- _BoolBitOp = Any
- _BoolSub = Any
- _BoolTrueDiv = Any
- _BoolMod = Any
- _BoolDivMod = Any
- _TD64Div = Any
- _IntTrueDiv = Any
- _UnsignedIntOp = Any
- _UnsignedIntBitOp = Any
- _UnsignedIntMod = Any
- _UnsignedIntDivMod = Any
- _SignedIntOp = Any
- _SignedIntBitOp = Any
- _SignedIntMod = Any
- _SignedIntDivMod = Any
- _FloatOp = Any
- _FloatMod = Any
- _FloatDivMod = Any
- _ComplexOp = Any
- _NumberOp = Any
- _ComparisonOp = Any
+ _BoolOp = NotImplemented
+ _BoolBitOp = NotImplemented
+ _BoolSub = NotImplemented
+ _BoolTrueDiv = NotImplemented
+ _BoolMod = NotImplemented
+ _BoolDivMod = NotImplemented
+ _TD64Div = NotImplemented
+ _IntTrueDiv = NotImplemented
+ _UnsignedIntOp = NotImplemented
+ _UnsignedIntBitOp = NotImplemented
+ _UnsignedIntMod = NotImplemented
+ _UnsignedIntDivMod = NotImplemented
+ _SignedIntOp = NotImplemented
+ _SignedIntBitOp = NotImplemented
+ _SignedIntMod = NotImplemented
+ _SignedIntDivMod = NotImplemented
+ _FloatOp = NotImplemented
+ _FloatMod = NotImplemented
+ _FloatDivMod = NotImplemented
+ _ComplexOp = NotImplemented
+ _NumberOp = NotImplemented
+ _ComparisonOp = NotImplemented
diff --git a/numpy/typing/_char_codes.py b/numpy/typing/_char_codes.py
index 24d39c62e..6b33f995d 100644
--- a/numpy/typing/_char_codes.py
+++ b/numpy/typing/_char_codes.py
@@ -120,52 +120,52 @@ if TYPE_CHECKING or _HAS_TYPING_EXTENSIONS:
]
else:
- _BoolCodes = Any
-
- _UInt8Codes = Any
- _UInt16Codes = Any
- _UInt32Codes = Any
- _UInt64Codes = Any
-
- _Int8Codes = Any
- _Int16Codes = Any
- _Int32Codes = Any
- _Int64Codes = Any
-
- _Float16Codes = Any
- _Float32Codes = Any
- _Float64Codes = Any
-
- _Complex64Codes = Any
- _Complex128Codes = Any
-
- _ByteCodes = Any
- _ShortCodes = Any
- _IntCCodes = Any
- _IntPCodes = Any
- _IntCodes = Any
- _LongLongCodes = Any
-
- _UByteCodes = Any
- _UShortCodes = Any
- _UIntCCodes = Any
- _UIntPCodes = Any
- _UIntCodes = Any
- _ULongLongCodes = Any
-
- _HalfCodes = Any
- _SingleCodes = Any
- _DoubleCodes = Any
- _LongDoubleCodes = Any
-
- _CSingleCodes = Any
- _CDoubleCodes = Any
- _CLongDoubleCodes = Any
-
- _StrCodes = Any
- _BytesCodes = Any
- _VoidCodes = Any
- _ObjectCodes = Any
-
- _DT64Codes = Any
- _TD64Codes = Any
+ _BoolCodes = NotImplemented
+
+ _UInt8Codes = NotImplemented
+ _UInt16Codes = NotImplemented
+ _UInt32Codes = NotImplemented
+ _UInt64Codes = NotImplemented
+
+ _Int8Codes = NotImplemented
+ _Int16Codes = NotImplemented
+ _Int32Codes = NotImplemented
+ _Int64Codes = NotImplemented
+
+ _Float16Codes = NotImplemented
+ _Float32Codes = NotImplemented
+ _Float64Codes = NotImplemented
+
+ _Complex64Codes = NotImplemented
+ _Complex128Codes = NotImplemented
+
+ _ByteCodes = NotImplemented
+ _ShortCodes = NotImplemented
+ _IntCCodes = NotImplemented
+ _IntPCodes = NotImplemented
+ _IntCodes = NotImplemented
+ _LongLongCodes = NotImplemented
+
+ _UByteCodes = NotImplemented
+ _UShortCodes = NotImplemented
+ _UIntCCodes = NotImplemented
+ _UIntPCodes = NotImplemented
+ _UIntCodes = NotImplemented
+ _ULongLongCodes = NotImplemented
+
+ _HalfCodes = NotImplemented
+ _SingleCodes = NotImplemented
+ _DoubleCodes = NotImplemented
+ _LongDoubleCodes = NotImplemented
+
+ _CSingleCodes = NotImplemented
+ _CDoubleCodes = NotImplemented
+ _CLongDoubleCodes = NotImplemented
+
+ _StrCodes = NotImplemented
+ _BytesCodes = NotImplemented
+ _VoidCodes = NotImplemented
+ _ObjectCodes = NotImplemented
+
+ _DT64Codes = NotImplemented
+ _TD64Codes = NotImplemented
diff --git a/numpy/typing/_dtype_like.py b/numpy/typing/_dtype_like.py
index 3903105c4..5d5dadc2e 100644
--- a/numpy/typing/_dtype_like.py
+++ b/numpy/typing/_dtype_like.py
@@ -76,8 +76,8 @@ if TYPE_CHECKING or _HAS_TYPING_EXTENSIONS:
def dtype(self) -> _DType_co: ...
else:
- _DTypeDict = Any
- _SupportsDType = Any
+ _DTypeDict = NotImplemented
+ _SupportsDType = NotImplemented
# Would create a dtype[np.void]