summaryrefslogtreecommitdiff
path: root/numpy/typing
diff options
context:
space:
mode:
authorDimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com>2021-09-21 09:18:37 +0200
committerDimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com>2021-09-21 20:29:43 +0200
commit83960267dc097742cb67ef575504afa56f82b102 (patch)
tree5de763d6385fc3fc630db0992cd6b2d2ff765ea6 /numpy/typing
parente467a284d1a2055337ce73cd92aadb491aa9a776 (diff)
downloadnumpy-83960267dc097742cb67ef575504afa56f82b102.tar.gz
DOC: Typos found by codespell
Diffstat (limited to 'numpy/typing')
-rw-r--r--numpy/typing/__init__.py2
-rw-r--r--numpy/typing/_generic_alias.py2
-rw-r--r--numpy/typing/tests/data/fail/bitwise_ops.py2
-rw-r--r--numpy/typing/tests/data/fail/numerictypes.py2
-rw-r--r--numpy/typing/tests/data/pass/simple.py2
-rw-r--r--numpy/typing/tests/test_typing.py6
6 files changed, 8 insertions, 8 deletions
diff --git a/numpy/typing/__init__.py b/numpy/typing/__init__.py
index 2bea3be86..81ab1afad 100644
--- a/numpy/typing/__init__.py
+++ b/numpy/typing/__init__.py
@@ -154,7 +154,7 @@ else:
__path__: List[str]
-@final # Dissallow the creation of arbitrary `NBitBase` subclasses
+@final # Disallow the creation of arbitrary `NBitBase` subclasses
class NBitBase:
"""
An object representing `numpy.number` precision during static type checking.
diff --git a/numpy/typing/_generic_alias.py b/numpy/typing/_generic_alias.py
index 8d65ef855..5ad5e580c 100644
--- a/numpy/typing/_generic_alias.py
+++ b/numpy/typing/_generic_alias.py
@@ -51,7 +51,7 @@ def _parse_parameters(args: Iterable[Any]) -> Generator[TypeVar, None, None]:
def _reconstruct_alias(alias: _T, parameters: Iterator[TypeVar]) -> _T:
- """Recursivelly replace all typevars with those from `parameters`.
+ """Recursively replace all typevars with those from `parameters`.
Helper function for `_GenericAlias.__getitem__`.
diff --git a/numpy/typing/tests/data/fail/bitwise_ops.py b/numpy/typing/tests/data/fail/bitwise_ops.py
index 8a8f89755..ee9090007 100644
--- a/numpy/typing/tests/data/fail/bitwise_ops.py
+++ b/numpy/typing/tests/data/fail/bitwise_ops.py
@@ -16,5 +16,5 @@ u8 & f8 # E: No overload variant
~f8 # E: Unsupported operand type
# mypys' error message for `NoReturn` is unfortunately pretty bad
-# TODO: Reenable this once we add support for numerical precision for `number`s
+# TODO: Re-enable this once we add support for numerical precision for `number`s
# a = u8 | 0 # E: Need type annotation
diff --git a/numpy/typing/tests/data/fail/numerictypes.py b/numpy/typing/tests/data/fail/numerictypes.py
index 9a81cd9dc..a5c2814ef 100644
--- a/numpy/typing/tests/data/fail/numerictypes.py
+++ b/numpy/typing/tests/data/fail/numerictypes.py
@@ -1,6 +1,6 @@
import numpy as np
-# Techincally this works, but probably shouldn't. See
+# Technically this works, but probably shouldn't. See
#
# https://github.com/numpy/numpy/issues/16366
#
diff --git a/numpy/typing/tests/data/pass/simple.py b/numpy/typing/tests/data/pass/simple.py
index 243caf229..85965e0de 100644
--- a/numpy/typing/tests/data/pass/simple.py
+++ b/numpy/typing/tests/data/pass/simple.py
@@ -47,7 +47,7 @@ np.dtype(object_dtype)
np.dtype((np.int32, (np.int8, 4)))
-# Dtype comparision
+# Dtype comparison
np.dtype(float) == float
np.dtype(float) != np.float64
np.dtype(float) < None
diff --git a/numpy/typing/tests/test_typing.py b/numpy/typing/tests/test_typing.py
index 35558c880..81863c780 100644
--- a/numpy/typing/tests/test_typing.py
+++ b/numpy/typing/tests/test_typing.py
@@ -36,7 +36,7 @@ OUTPUT_MYPY: Dict[str, List[str]] = {}
def _key_func(key: str) -> str:
- """Split at the first occurance of the ``:`` character.
+ """Split at the first occurrence of the ``:`` character.
Windows drive-letters (*e.g.* ``C:``) are ignored herein.
"""
@@ -246,8 +246,8 @@ def _parse_reveals(file: IO[str]) -> List[str]:
comments_array = np.char.partition(string.split("\n"), sep=" # E: ")[:, 2]
comments = "/n".join(comments_array)
- # Only search for the `{*}` pattern within comments,
- # otherwise there is the risk of accidently grabbing dictionaries and sets
+ # Only search for the `{*}` pattern within comments, otherwise
+ # there is the risk of accidentally grabbing dictionaries and sets
key_set = set(re.findall(r"\{(.*?)\}", comments))
kwargs = {
k: FORMAT_DICT.get(k, f"<UNRECOGNIZED FORMAT KEY {k!r}>") for k in key_set