Depend on Pillow instead of types-Pillow (#11720)

This commit is contained in:
Sebastian Rittau
2024-04-05 13:30:27 +02:00
committed by GitHub
parent 130a04905c
commit c0a44be33f
10 changed files with 35 additions and 24 deletions
@@ -1,15 +1,20 @@
# Verify that ImageTK images are valid to pass to TK code.
from __future__ import annotations
import tkinter
# The following tests don't work at the moment, due to pyright getting
# confused by the existence of these stubs and annotations in the actual
# Pillow package.
# https://github.com/python/typeshed/issues/11688
from PIL import ImageTk
# import tkinter
photo = ImageTk.PhotoImage()
bitmap = ImageTk.BitmapImage()
# from PIL import ImageTk
tkinter.Label(image=photo)
tkinter.Label(image=bitmap)
# photo = ImageTk.PhotoImage()
# bitmap = ImageTk.BitmapImage()
tkinter.Label().configure(image=photo)
tkinter.Label().configure(image=bitmap)
# tkinter.Label(image=photo)
# tkinter.Label(image=bitmap)
# tkinter.Label().configure(image=photo)
# tkinter.Label().configure(image=bitmap)