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
7 changes: 7 additions & 0 deletions stdlib/tkinter/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,8 @@ class Wm:
) -> tuple[int, int, int, int] | None: ...

aspect = wm_aspect

# wm_attributes: Get all attributes
if sys.version_info >= (3, 13):
@overload
def wm_attributes(self, *, return_python_dict: Literal[False] = False) -> tuple[Any, ...]: ...
Expand All @@ -775,6 +777,7 @@ class Wm:
@overload
def wm_attributes(self) -> tuple[Any, ...]: ...

# wm_attributes: Get one attribute (old variant using string that starts with "-")
@overload
def wm_attributes(self, option: Literal["-alpha"], /) -> float: ...
@overload
Expand Down Expand Up @@ -806,6 +809,7 @@ class Wm:
@overload
def wm_attributes(self, option: Literal["-type"], /) -> str: ...
if sys.version_info >= (3, 13):
# wm_attributes: Get one attribute (new variant without "-")
@overload
def wm_attributes(self, option: Literal["alpha"], /) -> float: ...
@overload
Expand Down Expand Up @@ -837,6 +841,7 @@ class Wm:
@overload
def wm_attributes(self, option: Literal["type"], /) -> str: ...

# wm_attributes: Set an attribute (old variant using string that starts with "-")
@overload
def wm_attributes(self, option: str, /): ...
@overload
Expand Down Expand Up @@ -868,9 +873,11 @@ class Wm:
@overload
def wm_attributes(self, option: Literal["-type"], value: str, /) -> Literal[""]: ...

# wm_attributes: Set multiple attributes (old variant using strings that start with "-")
@overload
def wm_attributes(self, option: str, value, /, *__other_option_value_pairs: Any) -> Literal[""]: ...

# wm_attributes: Set an attribute (new variant with kwarg instead of string)
if sys.version_info >= (3, 13):
if sys.platform == "darwin":
@overload
Expand Down
Loading