summaryrefslogtreecommitdiff
path: root/numpy/typing/_callable.py
diff options
context:
space:
mode:
authorBas van Beek <b.f.van.beek@vu.nl>2020-10-06 13:40:39 +0200
committerBas van Beek <b.f.van.beek@vu.nl>2020-10-06 13:40:39 +0200
commitd934c2620439cbcf9b6f19b6037c1c67346dd71f (patch)
tree9bca65631a36c84124e8675f2929446858663def /numpy/typing/_callable.py
parentcb92195c59be15415ce795367aeac6619f069257 (diff)
downloadnumpy-d934c2620439cbcf9b6f19b6037c1c67346dd71f.tar.gz
REV: Remove the `uint64`/`signedinteger` specific overload
Unfortunately the likes of `self: uint64` don't work with protocols. Revisit this once we add proper support for numerical precision.
Diffstat (limited to 'numpy/typing/_callable.py')
-rw-r--r--numpy/typing/_callable.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/numpy/typing/_callable.py b/numpy/typing/_callable.py
index 943441cf4..194522977 100644
--- a/numpy/typing/_callable.py
+++ b/numpy/typing/_callable.py
@@ -9,7 +9,7 @@ See the `Mypy documentation`_ on protocols for more details.
"""
import sys
-from typing import Union, TypeVar, overload, Any, NoReturn
+from typing import Union, TypeVar, overload, Any
from numpy import (
_BoolLike,
@@ -26,7 +26,6 @@ from numpy import (
signedinteger,
int32,
int64,
- uint64,
floating,
float32,
float64,
@@ -114,14 +113,12 @@ if HAVE_PROTOCOL:
def __call__(self, __other: complex) -> complexfloating[floating]: ...
class _UnsignedIntBitOp(Protocol):
- # The likes of `uint64 | np.signedinteger` will fail as there
+ # TODO: The likes of `uint64 | np.signedinteger` will fail as there
# is no signed integer type large enough to hold a `uint64`
# See https://github.com/numpy/numpy/issues/2524
@overload
def __call__(self, __other: Union[bool, unsignedinteger]) -> unsignedinteger: ...
@overload
- def __call__(self: uint64, __other: Union[int, signedinteger]) -> NoReturn: ...
- @overload
def __call__(self, __other: Union[int, signedinteger]) -> signedinteger: ...
class _SignedIntOp(Protocol):