Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrected argument types #8681

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

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:

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.

1 participant