Repository navigation
Temporarily ignore Pillow ImageFile context manager return type - #384
Merged
Merged
Conversation
Pillow 13.0.0 changes the context manager to return typing.Self, which was
added in Python 3.11, but we configure Mypy to assume Python 3.10+. This
causes pre-commit to fail:
openslide/__init__.py:395: error: Returning Any from function declared to return "str | None" [no-any-return]
Mypy should check 3.10+ syntax as long as we support 3.10, so re-add the
ignore for now. Bump the Mypy Pillow dependency to ensure we don't have
the opposite problem with old prek caches.
Signed-off-by: Benjamin Gilbert <bgilbert@cs.cmu.edu>
Member
DCO signed off ✔️All commits have been signed off. You have certified to the terms of the Developer Certificate of Origin, version 1.1. In particular, you certify that this contribution has not been developed using information obtained under a non-disclosure agreement or other license terms that forbid you from contributing it under the GNU Lesser General Public License, version 2.1. |
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.
Pillow 13.0.0 changes the context manager to return
typing.Self, which was added in Python 3.11, but we configure Mypy to assume Python 3.10+. This causes pre-commit to fail:Mypy should check 3.10+ syntax as long as we support 3.10, so re-add the ignore for now. Bump the Mypy Pillow dependency to ensure we don't have the opposite problem with old prek caches.