Add types for PIL.ImageTk (#9733)

This commit is contained in:
Spencer Brown authored and GitHub committed 2023-02-18 21:50:28 +02:00
1 parent 0bb7d621d3
commit f5b761d465
3 files changed
+80 -22

No files matched your search

@@ -0,0 +1,15 @@
# Verify that ImageTK images are valid to pass to TK code.
from __future__ import annotations
import tkinter
from PIL import ImageTk
photo = ImageTk.PhotoImage()
bitmap = ImageTk.BitmapImage()
tkinter.Label(image=photo)
tkinter.Label(image=bitmap)
tkinter.Label().configure(image=photo)
tkinter.Label().configure(image=bitmap)