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

Removed PPM loop to read header tokens #7698

Merged
merged 3 commits into from
Jan 9, 2024
Merged

Conversation

radarhere
Copy link
Member

PpmImagePlugin is structured to read each of the header tokens one at a time, and then perform an action with it.

for ix in range(3):
token = int(self._read_token())
if ix == 0: # token is the x size

It's simpler and shorter to remove the loop.

@hugovk hugovk merged commit 605e664 into python-pillow:main Jan 9, 2024
56 checks passed
@radarhere radarhere deleted the ppm branch January 9, 2024 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants