mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-27 00:19:58 +03:00
lint fixes
This commit is contained in:
parent
1159e65b4f
commit
1a02d4ed5a
|
@ -2,7 +2,6 @@ from __future__ import annotations
|
||||||
|
|
||||||
import json
|
import json
|
||||||
from typing import Any, NamedTuple
|
from typing import Any, NamedTuple
|
||||||
from itertools import repeat, chain
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
@ -17,12 +16,12 @@ from .helper import (
|
||||||
|
|
||||||
TYPE_CHECKING = False
|
TYPE_CHECKING = False
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from arro3.core import Array, DataType, Field, fixed_size_list_array
|
|
||||||
from arro3 import compute
|
from arro3 import compute
|
||||||
|
from arro3.core import Array, DataType, Field, fixed_size_list_array
|
||||||
else:
|
else:
|
||||||
arro3 = pytest.importorskip("arro3", reason="Arro3 not installed")
|
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 import compute
|
||||||
|
from arro3.core import Array, DataType, Field, fixed_size_list_array
|
||||||
|
|
||||||
TEST_IMAGE_SIZE = (10, 10)
|
TEST_IMAGE_SIZE = (10, 10)
|
||||||
|
|
||||||
|
@ -81,8 +80,10 @@ def _test_img_equals_int32_pyarray(
|
||||||
for ix, elt in enumerate(mask):
|
for ix, elt in enumerate(mask):
|
||||||
assert pixel[ix] == arr_pixel_tuple[elt]
|
assert pixel[ix] == arr_pixel_tuple[elt]
|
||||||
|
|
||||||
|
|
||||||
fl_uint8_4_type = DataType.list(Field("_", DataType.uint8()).with_nullable(False), 4)
|
fl_uint8_4_type = DataType.list(Field("_", DataType.uint8()).with_nullable(False), 4)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"mode, dtype, mask",
|
"mode, dtype, mask",
|
||||||
(
|
(
|
||||||
|
|
|
@ -57,9 +57,9 @@ optional-dependencies.mic = [
|
||||||
"olefile",
|
"olefile",
|
||||||
]
|
]
|
||||||
optional-dependencies.test-arrow = [
|
optional-dependencies.test-arrow = [
|
||||||
"pyarrow",
|
|
||||||
"arro3-core",
|
|
||||||
"arro3-compute",
|
"arro3-compute",
|
||||||
|
"arro3-core",
|
||||||
|
"pyarrow",
|
||||||
]
|
]
|
||||||
|
|
||||||
optional-dependencies.tests = [
|
optional-dependencies.tests = [
|
||||||
|
|
|
@ -98,19 +98,13 @@ single_band_json(Imaging im) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = PyOS_snprintf(
|
err = PyOS_snprintf(json, len, format, im->band_names[0]);
|
||||||
json,
|
|
||||||
len,
|
|
||||||
format,
|
|
||||||
im->band_names[0]
|
|
||||||
);
|
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
char *
|
char *
|
||||||
assemble_metadata(const char *band_json) {
|
assemble_metadata(const char *band_json) {
|
||||||
/* format is
|
/* format is
|
||||||
|
|
Loading…
Reference in New Issue
Block a user