Skip to content

Conversation

@radarhere
Copy link
Member

class _Tile(NamedTuple):
codec_name: str
extents: tuple[int, int, int, int] | None
offset: int
args: tuple[Any, ...] | str | None

Adding defaults of 0 for offset and None for args will allow small simplifications to some instantiations of ImageFile._Tile.

An args value of (mode, 0, 1) can also be replaced by mode

Pillow/src/PIL/ImageFile.py

Lines 221 to 222 in 5bff2f3

if isinstance(args, str):
args = (args, 0, 1)

@radarhere radarhere removed the Cleanup label Dec 11, 2024
@hugovk hugovk merged commit 2c3395f into python-pillow:main Dec 27, 2024
47 of 48 checks passed
@radarhere radarhere deleted the tile branch December 27, 2024 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants