mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-25 11:07:17 +08:00
Using precise code for pyright: ignore and re-enabling various pyright tests (#12576)
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
# Verify that ImageTK images are valid to pass to TK code.
|
||||
from __future__ import annotations
|
||||
|
||||
# The following tests don't work at the moment, due to pyright getting
|
||||
# The following tests don't work on pyright at the moment, due to it getting
|
||||
# confused by the existence of these stubs and annotations in the actual
|
||||
# Pillow package.
|
||||
# https://github.com/python/typeshed/issues/11688
|
||||
# pyright: reportArgumentType=false
|
||||
import tkinter
|
||||
|
||||
# import tkinter
|
||||
from PIL import ImageTk
|
||||
|
||||
# from PIL import ImageTk
|
||||
photo = ImageTk.PhotoImage()
|
||||
bitmap = ImageTk.BitmapImage()
|
||||
|
||||
# photo = ImageTk.PhotoImage()
|
||||
# bitmap = ImageTk.BitmapImage()
|
||||
tkinter.Label(image=photo)
|
||||
tkinter.Label(image=bitmap)
|
||||
|
||||
# tkinter.Label(image=photo)
|
||||
# tkinter.Label(image=bitmap)
|
||||
|
||||
# tkinter.Label().configure(image=photo)
|
||||
# tkinter.Label().configure(image=bitmap)
|
||||
tkinter.Label().configure(image=photo)
|
||||
tkinter.Label().configure(image=bitmap)
|
||||
|
||||
Reference in New Issue
Block a user