FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Assert image type by radarhere · Pull Request #8619 · python-pillow/Pillow · GitHub

Assert image type - #8619

Merged
hugovk merged 4 commits into
python-pillow:mainfrom
radarhere:format
Mar 30, 2025
Merged

Assert image type#8619
hugovk merged 4 commits into
python-pillow:mainfrom
radarhere:format

Conversation

radarhere commented Dec 23, 2024
edited
Loading

Copy link
Copy Markdown
Member

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

The test suite contains code like

with Image.open("Tests/images/apng/single_frame.png") as im:
assert not im.is_animated

But is_animated is not a property on a generic image, only on certain image formats. So this PR adds asserts to make sure the image are of the right format.

hugovk merged commit 14fb62e into python-pillow:main Mar 30, 2025
radarhere deleted the format branch March 30, 2025 10:31
radarhere mentioned this pull request Mar 30, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL