Skip to content
Merged
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
17 changes: 3 additions & 14 deletions stdlib/3/tkinter/font.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import tkinter
from typing import List, Optional, Tuple, TypeVar, Union, overload
from typing import Any, List, Optional, Tuple, TypeVar, Union, overload
from typing_extensions import Literal, TypedDict

NORMAL: Literal["normal"]
Expand Down Expand Up @@ -48,6 +48,8 @@ class Font:
underline: bool = ...,
overstrike: bool = ...,
) -> None: ...
def __getitem__(self, key: str) -> Any: ...
def __setitem__(self, key: str, value: Any) -> None: ...
@overload
def cget(self, option: Literal["family"]) -> str: ...
@overload
Expand All @@ -58,7 +60,6 @@ class Font:
def cget(self, option: Literal["slant"]) -> Literal["roman", "italic"]: ...
@overload
def cget(self, option: Literal["underline", "overstrike"]) -> Literal[0, 1]: ...
__getitem__ = cget
@overload
def actual(self, option: Literal["family"], displayof: Optional[tkinter.Misc] = ...) -> str: ...
@overload
Expand All @@ -73,18 +74,6 @@ class Font:
def actual(self, option: None, displayof: Optional[tkinter.Misc] = ...) -> _FontDict: ...
@overload
def actual(self, *, displayof: Optional[tkinter.Misc] = ...) -> _FontDict: ...
@overload
def __setitem__(self, key: Literal["family"], value: str) -> None: ...
@overload
def __setitem__(self, key: Literal["size"], value: int) -> None: ...
@overload
def __setitem__(self, key: Literal["weight"], value: Literal["normal", "bold"]) -> None: ...
@overload
def __setitem__(self, key: Literal["slant"], value: Literal["roman", "italic"]) -> None: ...
@overload
def __setitem__(self, key: Literal["underline"], value: bool) -> None: ...
@overload
def __setitem__(self, key: Literal["overstrike"], value: bool) -> None: ...
def config(
self,
*,
Expand Down