Skip to content

Commit 8952070

Browse files
JonathanPlasseZac-HD
authored andcommitted
Fix test and a typo
1 parent 9bed941 commit 8952070

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

hypothesis-python/src/hypothesis/extra/numpy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ def integer_dtypes(
741741
def integer_dtypes(
742742
*,
743743
endianness: str = "?",
744-
sizes: Union[Literal[8, 16, 32, 64] | Sequence[Literal[8, 16, 32, 64]]] = (
744+
sizes: Union[Literal[8, 16, 32, 64], Sequence[Literal[8, 16, 32, 64]]] = (
745745
8,
746746
16,
747747
32,

whole-repo-tests/test_mypy.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def convert_lines():
133133
),
134134
(
135135
"arrays(dtype=np.dtype(int), shape=1)",
136-
"ndarray[Any, dtype[Any]]",
136+
"ndarray[Any, dtype[signedinteger[Any]]]",
137137
),
138138
(
139139
"boolean_dtypes()",
@@ -233,15 +233,15 @@ def convert_lines():
233233
),
234234
(
235235
"integer_array_indices(shape=(2, 3))",
236-
"Tuple[ndarray[Any, dtype[signedinteger[Any]]",
236+
"tuple[ndarray[Any, dtype[signedinteger[Any], ...]",
237237
),
238238
(
239239
'integer_array_indices(shape=(2, 3), dtype=np.dtype("int32"))',
240-
"Tuple[ndarray[Any, dtype[signedinteger[_32Bit]]",
240+
"tuple[ndarray[Any, dtype[signedinteger[_32Bit], ...]",
241241
),
242242
(
243243
'integer_array_indices(shape=(2, 3), dtype=np.dtype("uint8"))',
244-
"Tuple[ndarray[Any, dtype[unsignedinteger[_8Bit]]",
244+
"tuple[ndarray[Any, dtype[unsignedinteger[_8Bit], ...]",
245245
),
246246
# Note: keep this in sync with the equivalent test for Pyright
247247
],

whole-repo-tests/test_pyright.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def test_numpy_arrays_strategy(tmp_path: Path):
213213
),
214214
(
215215
"arrays(dtype=np.dtype(int), shape=1)",
216-
"ndarray[Any, dtype[Any]]",
216+
"ndarray[Any, dtype[signedinteger[Any]]]",
217217
),
218218
(
219219
"boolean_dtypes()",
@@ -313,15 +313,15 @@ def test_numpy_arrays_strategy(tmp_path: Path):
313313
),
314314
(
315315
"integer_array_indices(shape=(2, 3))",
316-
"Tuple[ndarray[Any, dtype[signedinteger[Any]]",
316+
"Tuple[ndarray[Any, dtype[signedinteger[Any], ...]",
317317
),
318318
(
319319
'integer_array_indices(shape=(2, 3), dtype=np.dtype("int32"))',
320-
"Tuple[ndarray[Any, dtype[signedinteger[_32Bit]]",
320+
"Tuple[ndarray[Any, dtype[signedinteger[_32Bit], ...]",
321321
),
322322
(
323323
'integer_array_indices(shape=(2, 3), dtype=np.dtype("uint8"))',
324-
"Tuple[ndarray[Any, dtype[unsignedinteger[_8Bit]]",
324+
"Tuple[ndarray[Any, dtype[unsignedinteger[_8Bit], ...]",
325325
),
326326
# Note: keep this in sync with the equivalent test for Mypy
327327
],

0 commit comments

Comments
 (0)