Skip to content

Commit

Permalink
Merge pull request #8613 from python-pillow/renovate/mypy-1.x
Browse files Browse the repository at this point in the history
Update dependency mypy to v1.14.0
  • Loading branch information
radarhere authored Dec 22, 2024
2 parents 1146190 + 08e1f9e commit 0e3f51d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .ci/requirements-mypy.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
mypy==1.13.0
mypy==1.14.0
IceSpringPySideStubs-PyQt6
IceSpringPySideStubs-PySide6
ipython
Expand Down
2 changes: 2 additions & 0 deletions Tests/test_color_lut.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,12 @@ def test_numpy_sources(self) -> None:

table = numpy.ones((7 * 6 * 5, 3), dtype=numpy.float16)
lut = ImageFilter.Color3DLUT((5, 6, 7), table)
assert isinstance(lut.table, numpy.ndarray)
assert lut.table.shape == (table.size,)

table = numpy.ones((7 * 6 * 5 * 3), dtype=numpy.float16)
lut = ImageFilter.Color3DLUT((5, 6, 7), table)
assert isinstance(lut.table, numpy.ndarray)
assert lut.table.shape == (table.size,)

# Check application
Expand Down
2 changes: 1 addition & 1 deletion src/PIL/ImageFilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ def transform(
ch_out = channels or ch_in
size_1d, size_2d, size_3d = self.size

table = [0] * (size_1d * size_2d * size_3d * ch_out)
table: list[float] = [0] * (size_1d * size_2d * size_3d * ch_out)
idx_in = 0
idx_out = 0
for b in range(size_3d):
Expand Down

0 comments on commit 0e3f51d

Please sign in to comment.