mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-08-18 22:08:03 +08:00
Add types for PIL.ImageTk (#9733)
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user