-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Added ImageType as alias for Image.Image #7639
Conversation
f74eb2c
to
42f31be
Compare
I wasn't sure how this would affect the docs, but it looks good: Should |
Ok, I've added it to the docs - https://pillow--7639.org.readthedocs.build/en/7639/reference/Image.html |
Co-authored-by: Ondrej Baranovič <nulano@nulano.eu>
I know I suggested this in the first place, but after some thought, perhaps it's not so useful after all.
I can see aliases may be more useful for more complex things, such as tuples of ints for RGB etc, but I think we should pass on this one. |
Helps #2625.
Resolves #6676. Also suggested in #7635 (review)
When using the
Image
class as a type hint, you must currently usefrom PIL import Image; Image.Image
.This PR allows for
from PIL import ImageType; ImageType
.