From 1a02d4ed5a1672218249ed129f43d4109b32e183 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Sun, 20 Jul 2025 13:01:39 +0200 Subject: [PATCH] lint fixes --- Tests/test_arro3.py | 7 ++++--- pyproject.toml | 4 ++-- src/libImaging/Arrow.c | 8 +------- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/Tests/test_arro3.py b/Tests/test_arro3.py index ddc7ecd0a..a7c755fc2 100644 --- a/Tests/test_arro3.py +++ b/Tests/test_arro3.py @@ -2,7 +2,6 @@ from __future__ import annotations import json from typing import Any, NamedTuple -from itertools import repeat, chain import pytest @@ -17,12 +16,12 @@ from .helper import ( TYPE_CHECKING = False if TYPE_CHECKING: - from arro3.core import Array, DataType, Field, fixed_size_list_array from arro3 import compute + from arro3.core import Array, DataType, Field, fixed_size_list_array else: arro3 = pytest.importorskip("arro3", reason="Arro3 not installed") - from arro3.core import Array, DataType, Field, fixed_size_list_array from arro3 import compute + from arro3.core import Array, DataType, Field, fixed_size_list_array TEST_IMAGE_SIZE = (10, 10) @@ -81,8 +80,10 @@ def _test_img_equals_int32_pyarray( for ix, elt in enumerate(mask): assert pixel[ix] == arr_pixel_tuple[elt] + fl_uint8_4_type = DataType.list(Field("_", DataType.uint8()).with_nullable(False), 4) + @pytest.mark.parametrize( "mode, dtype, mask", ( diff --git a/pyproject.toml b/pyproject.toml index b1765e82c..899e833e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,9 +57,9 @@ optional-dependencies.mic = [ "olefile", ] optional-dependencies.test-arrow = [ - "pyarrow", - "arro3-core", "arro3-compute", + "arro3-core", + "pyarrow", ] optional-dependencies.tests = [ diff --git a/src/libImaging/Arrow.c b/src/libImaging/Arrow.c index ff98dfb51..4519243ae 100644 --- a/src/libImaging/Arrow.c +++ b/src/libImaging/Arrow.c @@ -98,19 +98,13 @@ single_band_json(Imaging im) { return NULL; } - err = PyOS_snprintf( - json, - len, - format, - im->band_names[0] - ); + err = PyOS_snprintf(json, len, format, im->band_names[0]); if (err < 0) { return NULL; } return json; } - char * assemble_metadata(const char *band_json) { /* format is