summaryrefslogtreecommitdiff
path: root/numpy/typing
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2021-02-01 12:23:33 -0700
committerGitHub <noreply@github.com>2021-02-01 12:23:33 -0700
commitac7676930a8ea25502c2856fa364c0cef0913ae3 (patch)
tree8158b9d964c39dade393f6300346e551efeb3cd1 /numpy/typing
parentc03d892ece761aa17f7452d78a21c76afd5c6c8a (diff)
parent709b6713502792438d0569f737f3a2d78dbeb74b (diff)
downloadnumpy-ac7676930a8ea25502c2856fa364c0cef0913ae3.tar.gz
Merge pull request #18284 from BvB93/aliases
ENH: Add annotations for the remaining `np.generic` aliases
Diffstat (limited to 'numpy/typing')
-rw-r--r--numpy/typing/tests/data/pass/scalars.py5
-rw-r--r--numpy/typing/tests/data/reveal/scalars.py5
2 files changed, 10 insertions, 0 deletions
diff --git a/numpy/typing/tests/data/pass/scalars.py b/numpy/typing/tests/data/pass/scalars.py
index 2f2643e8e..c3f4ddbcc 100644
--- a/numpy/typing/tests/data/pass/scalars.py
+++ b/numpy/typing/tests/data/pass/scalars.py
@@ -166,6 +166,11 @@ c16.transpose()
# Aliases
np.str0()
+np.bool8()
+np.bytes0()
+np.string_()
+np.object0()
+np.void0(0)
np.byte()
np.short()
diff --git a/numpy/typing/tests/data/reveal/scalars.py b/numpy/typing/tests/data/reveal/scalars.py
index faa7ac3d2..fa94aa49b 100644
--- a/numpy/typing/tests/data/reveal/scalars.py
+++ b/numpy/typing/tests/data/reveal/scalars.py
@@ -30,6 +30,11 @@ reveal_type(np.str0('foo')) # E: numpy.str_
# Aliases
reveal_type(np.unicode_()) # E: numpy.str_
reveal_type(np.str0()) # E: numpy.str_
+reveal_type(np.bool8()) # E: numpy.bool_
+reveal_type(np.bytes0()) # E: numpy.bytes_
+reveal_type(np.string_()) # E: numpy.bytes_
+reveal_type(np.object0()) # E: numpy.object_
+reveal_type(np.void0(0)) # E: numpy.void
reveal_type(np.byte()) # E: {byte}
reveal_type(np.short()) # E: {short}