Skip to content

Conversation

@radarhere
Copy link
Member

This is part of #8362 - I'm hoping to break down that PR into easier-to-review chunks.

  1. im.remap_palette(None)

    should use a list, as per

Pillow/src/PIL/Image.py

Lines 2138 to 2140 in af3b904

def remap_palette(
self, dest_map: list[int], source_palette: bytes | bytearray | None = None
) -> Image:

  1. exif.load(None)

    should use a bytestring, as per
    def load(self, data: bytes) -> None:

  2. im.resize((10, 10), "unknown")
    should use an int (or None) for the second argument, as per

    Pillow/src/PIL/Image.py

    Lines 2250 to 2256 in af3b904

    def resize(
    self,
    size: tuple[int, int] | list[int] | NumpyArray,
    resample: int | None = None,
    box: tuple[float, float, float, float] | None = None,
    reducing_gap: float | None = None,
    ) -> Image:

@hugovk hugovk merged commit df7e42e into python-pillow:main Jan 16, 2025
48 checks passed
@radarhere radarhere deleted the types branch January 16, 2025 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants