Skip to content

Commit 13e4e58

Browse files
committed
added import-not-found ignores, removed call-overload ignores
1 parent 324258c commit 13e4e58

File tree

2 files changed

+18
-15
lines changed

2 files changed

+18
-15
lines changed

Tests/test_arro3.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616

1717
TYPE_CHECKING = False
1818
if TYPE_CHECKING:
19-
from arro3 import compute
19+
from arro3 import compute # type: ignore [import-not-found]
20+
21+
# type: ignore [import-not-found]
2022
from arro3.core import Array, DataType, Field, fixed_size_list_array
2123
else:
2224
arro3 = pytest.importorskip("arro3", reason="Arro3 not installed")
@@ -106,7 +108,7 @@ def test_to_array(mode: str, dtype: DataType, mask: list[int] | None) -> None:
106108
img = img.crop((3, 0, 124, 127))
107109
assert img.size == (121, 127)
108110

109-
arr = Array(img) # type: ignore[call-overload]
111+
arr = Array(img)
110112
_test_img_equals_pyarray(img, arr, mask)
111113
assert arr.type == dtype
112114

@@ -123,8 +125,8 @@ def test_lifetime() -> None:
123125

124126
img = hopper("L")
125127

126-
arr_1 = Array(img) # type: ignore[call-overload]
127-
arr_2 = Array(img) # type: ignore[call-overload]
128+
arr_1 = Array(img)
129+
arr_2 = Array(img)
128130

129131
del img
130132

@@ -141,8 +143,8 @@ def test_lifetime2() -> None:
141143

142144
img = hopper("L")
143145

144-
arr_1 = Array(img) # type: ignore[call-overload]
145-
arr_2 = Array(img) # type: ignore[call-overload]
146+
arr_1 = Array(img)
147+
arr_2 = Array(img)
146148

147149
assert compute.sum(arr_1).as_py() > 0
148150
del arr_1
@@ -261,8 +263,9 @@ def test_from_int32array(mode: str, mask: list[int] | None, data_tp: DataShape)
261263
def test_image_metadata(mode: str, metadata: list[str]) -> None:
262264
img = hopper(mode)
263265

264-
arr = Array(img) # type: ignore[call-overload]
266+
arr = Array(img)
265267

268+
assert arr.type.value_field
266269
assert arr.type.value_field.metadata
267270
assert arr.type.value_field.metadata[b"image"]
268271

Tests/test_nanoarrow.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
TYPE_CHECKING = False
1818
if TYPE_CHECKING:
19-
import nanoarrow
19+
import nanoarrow # type: ignore [import-untyped]
2020
else:
2121
nanoarrow = pytest.importorskip("nanoarrow", reason="Nanoarrow not installed")
2222

@@ -105,7 +105,7 @@ def test_to_array(mode: str, dtype: nanoarrow, mask: list[int] | None) -> None:
105105
img = img.crop((3, 0, 124, 127))
106106
assert img.size == (121, 127)
107107

108-
arr = nanoarrow.Array(img) # type: ignore[call-overload]
108+
arr = nanoarrow.Array(img)
109109
_test_img_equals_pyarray(img, arr, mask)
110110
assert arr.schema.type == dtype.type
111111
assert arr.schema.nullable == dtype.nullable
@@ -123,8 +123,8 @@ def test_lifetime() -> None:
123123

124124
img = hopper("L")
125125

126-
arr_1 = nanoarrow.Array(img) # type: ignore[call-overload]
127-
arr_2 = nanoarrow.Array(img) # type: ignore[call-overload]
126+
arr_1 = nanoarrow.Array(img)
127+
arr_2 = nanoarrow.Array(img)
128128

129129
del img
130130

@@ -141,8 +141,8 @@ def test_lifetime2() -> None:
141141

142142
img = hopper("L")
143143

144-
arr_1 = nanoarrow.Array(img) # type: ignore[call-overload]
145-
arr_2 = nanoarrow.Array(img) # type: ignore[call-overload]
144+
arr_1 = nanoarrow.Array(img)
145+
arr_2 = nanoarrow.Array(img)
146146

147147
assert sum(arr_1.iter_py()) > 0
148148
del arr_1
@@ -270,7 +270,7 @@ def test_from_int32array(mode: str, mask: list[int] | None, data_tp: DataShape)
270270
def test_image_nested_metadata(mode: str, metadata: list[str]) -> None:
271271
img = hopper(mode)
272272

273-
arr = nanoarrow.Array(img) # type: ignore[call-overload]
273+
arr = nanoarrow.Array(img)
274274

275275
assert arr.schema.value_type.metadata
276276
assert arr.schema.value_type.metadata[b"image"]
@@ -294,7 +294,7 @@ def test_image_nested_metadata(mode: str, metadata: list[str]) -> None:
294294
def test_image_flat_metadata(mode: str, metadata: list[str]) -> None:
295295
img = hopper(mode)
296296

297-
arr = nanoarrow.Array(img) # type: ignore[call-overload]
297+
arr = nanoarrow.Array(img)
298298

299299
assert arr.schema.metadata
300300
assert arr.schema.metadata[b"image"]

0 commit comments

Comments
 (0)