tkinter: font size must be integer (#11295)

This commit is contained in:
Akuli
2024-01-21 03:10:29 +02:00
committed by GitHub
parent 8885cc870c
commit 02e19d6e2d
2 changed files with 13 additions and 2 deletions

View File

@@ -20,3 +20,11 @@ def foo(x: int, y: str) -> None:
root.after(1000, foo, 10, "lol")
root.after(1000, foo, 10, 10) # type: ignore
# Font size must be integer
label = tkinter.Label()
label.config(font=("", 12))
label.config(font=("", 12.34)) # type: ignore
label.config(font=("", 12, "bold"))
label.config(font=("", 12.34, "bold")) # type: ignore