Merged
Conversation
Owner
|
Sure, let's include this. |
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Suggestion for python-pillow#9398
When opening, there's a check that
extisn't empty.Pillow/src/PIL/Image.py
Lines 3635 to 3637 in 2b186fc
When saving, there's no reason why
extderived from the filename couldn't also be empty. I mean, saving a file without a file extension or aformatwill raise an error in the end, but as far as this part of the code is concerned,extcould be empty.Pillow/src/PIL/Image.py
Lines 2639 to 2648 in 2b186fc
So perhaps it is a good idea to move the check if
extis empty inside_import_plugin_for_extension()?On the other hand, it is very clearly an edge case, and this change makes no real difference to the end result, so I don't mind if the main PR is merged with or without this.