mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-26 21:08:59 +08:00
Add many missing tkinter type annotations (#6002)
Co-authored-by: Sebastian Rittau <srittau@rittau.biz> Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import _tkinter
|
||||
import sys
|
||||
import tkinter
|
||||
from typing import Any, Tuple, Union, overload
|
||||
@@ -8,8 +9,16 @@ ROMAN: Literal["roman"]
|
||||
BOLD: Literal["bold"]
|
||||
ITALIC: Literal["italic"]
|
||||
|
||||
# Can contain e.g. nested sequences ('FONT DESCRIPTIONS' in font man page)
|
||||
_FontDescription = Union[str, Font, tkinter._TkinterSequence[Any]]
|
||||
_FontDescription = Union[
|
||||
# "Helvetica 12"
|
||||
str,
|
||||
# A font object constructed in Python
|
||||
Font,
|
||||
# ("Helvetica", 12, BOLD)
|
||||
tkinter._TkinterSequence[Any],
|
||||
# A font object constructed in Tcl
|
||||
_tkinter.Tcl_Obj,
|
||||
]
|
||||
|
||||
class _FontDict(TypedDict):
|
||||
family: str
|
||||
|
||||
Reference in New Issue
Block a user