@@ -78,9 +78,9 @@ def _test_img_equals_int32_pyarray(
7878 assert pixel [ix ] == arr_pixel_tuple [elt ]
7979
8080
81- fl_uint8_4_type = nanoarrow .fixed_size_list (value_type = nanoarrow . uint8 ( nullable = False ),
82- list_size = 4 ,
83- nullable = False )
81+ fl_uint8_4_type = nanoarrow .fixed_size_list (
82+ value_type = nanoarrow . uint8 ( nullable = False ), list_size = 4 , nullable = False
83+ )
8484
8585
8686@pytest .mark .parametrize (
@@ -190,7 +190,9 @@ class DataShape(NamedTuple):
190190)
191191
192192
193- @pytest .mark .xfail (reason = "Support for nested array creation is not available in nanoarrow/python" )
193+ @pytest .mark .xfail (
194+ reason = "Support for nested array creation is not available in nanoarrow/python"
195+ )
194196@pytest .mark .parametrize (
195197 "mode, data_tp, mask" ,
196198 (
@@ -219,10 +221,14 @@ def test_fromarray(mode: str, data_tp: DataShape, mask: list[int] | None) -> Non
219221 # Apparently there's no good way to create this array from python using nanoarrow
220222 # https://github.com/apache/arrow-nanoarrow/issues/620
221223 # the following lines will fail.
222- tmp_arr = nanoarrow .c_array (elt * (ct_pixels * elts_per_pixel ), schema = nanoarrow .uint8 ())
224+ tmp_arr = nanoarrow .c_array (
225+ elt * (ct_pixels * elts_per_pixel ), schema = nanoarrow .uint8 ()
226+ )
223227 arr = nanoarrow .Array (tmp_arr , schema = dtype )
224228 else :
225- arr = nanoarrow .Array (nanoarrow .c_array ([elt ] * (ct_pixels * elts_per_pixel ), schema = dtype ))
229+ arr = nanoarrow .Array (
230+ nanoarrow .c_array ([elt ] * (ct_pixels * elts_per_pixel ), schema = dtype )
231+ )
226232 img = Image .fromarrow (arr , mode , TEST_IMAGE_SIZE )
227233
228234 _test_img_equals_pyarray (img , arr , mask , elts_per_pixel )
@@ -249,7 +255,9 @@ def test_from_int32array(mode: str, data_tp: DataShape, mask: list[int] | None)
249255 (dtype , elt , elts_per_pixel ) = data_tp
250256
251257 ct_pixels = TEST_IMAGE_SIZE [0 ] * TEST_IMAGE_SIZE [1 ]
252- arr = nanoarrow .Array (nanoarrow .c_array ([elt ] * (ct_pixels * elts_per_pixel ), schema = dtype ))
258+ arr = nanoarrow .Array (
259+ nanoarrow .c_array ([elt ] * (ct_pixels * elts_per_pixel ), schema = dtype )
260+ )
253261 img = Image .fromarrow (arr , mode , TEST_IMAGE_SIZE )
254262
255263 _test_img_equals_int32_pyarray (img , arr , mask , elts_per_pixel )
@@ -275,7 +283,9 @@ def test_image_nested_metadata(mode: str, metadata: list[str]) -> None:
275283 assert arr .schema .value_type .metadata
276284 assert arr .schema .value_type .metadata [b"image" ]
277285
278- parsed_metadata = json .loads (arr .schema .value_type .metadata [b"image" ].decode ("utf8" ))
286+ parsed_metadata = json .loads (
287+ arr .schema .value_type .metadata [b"image" ].decode ("utf8" )
288+ )
279289
280290 assert "bands" in parsed_metadata
281291 assert parsed_metadata ["bands" ] == metadata
0 commit comments