FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

tkinter: add **kwargs support to tkinter.Misc.after for 3.14 by JelleZijlstra · Pull Request #15720 · python/typeshed · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .pyi  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
20 changes: 15 additions & 5 deletions stdlib/tkinter/__init__.pyi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ from typing import (
Generic,
Literal,
NamedTuple,
ParamSpec,
Protocol,
TypeAlias,
TypedDict,
Expand Down Expand Up @@ -376,6 +377,7 @@ getdouble = float
def getboolean(s) -> bool: ...

_Ts = TypeVarTuple("_Ts")
_P = ParamSpec("_P")

@type_check_only
class _GridIndexInfo(TypedDict, total=False):
Expand Down Expand Up @@ -415,11 +417,19 @@ class Misc:
def tk_focusFollowsMouse(self) -> None: ...
def tk_focusNext(self) -> Misc | None: ...
def tk_focusPrev(self) -> Misc | None: ...
# .after() can be called without the "func" argument, but it is basically never what you want.
# It behaves like time.sleep() and freezes the GUI app.
def after(self, ms: int | Literal["idle"], func: Callable[[Unpack[_Ts]], object], *args: Unpack[_Ts]) -> str: ...
# after_idle is essentially partialmethod(after, "idle")
def after_idle(self, func: Callable[[Unpack[_Ts]], object], *args: Unpack[_Ts]) -> str: ...
if sys.version_info >= (3, 14):
# .after() can be called without the "func" argument, but it is basically never what you want.
# It behaves like time.sleep() and freezes the GUI app.
def after(self, ms: int | Literal["idle"], func: Callable[_P, object], *args: _P.args, **kwargs: _P.kwargs) -> str: ...
# after_idle is essentially partialmethod(after, "idle")
def after_idle(self, func: Callable[_P, object], *args: _P.args, **kwargs: _P.kwargs) -> str: ...
else:
# .after() can be called without the "func" argument, but it is basically never what you want.
# It behaves like time.sleep() and freezes the GUI app.
def after(self, ms: int | Literal["idle"], func: Callable[[Unpack[_Ts]], object], *args: Unpack[_Ts]) -> str: ...
# after_idle is essentially partialmethod(after, "idle")
def after_idle(self, func: Callable[[Unpack[_Ts]], object], *args: Unpack[_Ts]) -> str: ...

def after_cancel(self, id: str) -> None: ...
if sys.version_info >= (3, 13):
def after_info(self, id: str | None = None) -> tuple[str, ...]: ...
Expand Down
Loading

Back | FazBrowse Home | New Git URL