Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stdlib/3/tkinter/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ _InMiscNonTotal = TypedDict("_InMiscNonTotal", {"in": Misc}, total=False)
class _PackInfo(_InMiscTotal):
# 'before' and 'after' never appear in _PackInfo
anchor: _Anchor
expand: Literal[0, 1]
expand: bool
fill: Literal["none", "x", "y", "both"]
side: Literal["left", "right", "top", "bottom"]
# Paddings come out as int or tuple of int, even though any _ScreenUnits
Expand Down
12 changes: 6 additions & 6 deletions stdlib/3/tkinter/font.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ class _FontDict(TypedDict):
size: int
weight: Literal["normal", "bold"]
slant: Literal["roman", "italic"]
underline: Literal[0, 1]
overstrike: Literal[0, 1]
underline: bool
overstrike: bool

class _MetricsDict(TypedDict):
ascent: int
descent: int
linespace: int
fixed: Literal[0, 1]
fixed: bool

class Font:
name: str
Expand Down Expand Up @@ -56,7 +56,7 @@ class Font:
@overload
def cget(self, option: Literal["slant"]) -> Literal["roman", "italic"]: ...
@overload
def cget(self, option: Literal["underline", "overstrike"]) -> Literal[0, 1]: ...
def cget(self, option: Literal["underline", "overstrike"]) -> bool: ...
@overload
def cget(self, option: str) -> Any: ...
__getitem__ = cget
Expand All @@ -69,7 +69,7 @@ class Font:
@overload
def actual(self, option: Literal["slant"], displayof: Optional[tkinter.Misc] = ...) -> Literal["roman", "italic"]: ...
@overload
def actual(self, option: Literal["underline", "overstrike"], displayof: Optional[tkinter.Misc] = ...) -> Literal[0, 1]: ...
def actual(self, option: Literal["underline", "overstrike"], displayof: Optional[tkinter.Misc] = ...) -> bool: ...
@overload
def actual(self, option: None, displayof: Optional[tkinter.Misc] = ...) -> _FontDict: ...
@overload
Expand All @@ -89,7 +89,7 @@ class Font:
@overload
def metrics(self, __option: Literal["ascent", "descent", "linespace"], *, displayof: Optional[tkinter.Misc] = ...) -> int: ...
@overload
def metrics(self, __option: Literal["fixed"], *, displayof: Optional[tkinter.Misc] = ...) -> Literal[0, 1]: ...
def metrics(self, __option: Literal["fixed"], *, displayof: Optional[tkinter.Misc] = ...) -> bool: ...
@overload
def metrics(self, *, displayof: Optional[tkinter.Misc] = ...) -> _MetricsDict: ...
def measure(self, text: str, displayof: Optional[tkinter.Misc] = ...) -> int: ...
Expand Down