Update tkinter.Misc for 3.13 (#12367)

This commit is contained in:
Max Muoto
2024-12-27 22:59:32 -06:00
committed by GitHub
parent 87267342d5
commit 92231a5728
2 changed files with 22 additions and 23 deletions

View File

@@ -3,29 +3,6 @@
# =========================
# =======
# >= 3.13
# =======
# TODO: triage these new errors
tkinter.Misc.busy
tkinter.Misc.busy_cget
tkinter.Misc.busy_config
tkinter.Misc.busy_configure
tkinter.Misc.busy_current
tkinter.Misc.busy_forget
tkinter.Misc.busy_hold
tkinter.Misc.busy_status
tkinter.Misc.tk_busy
tkinter.Misc.tk_busy_cget
tkinter.Misc.tk_busy_config
tkinter.Misc.tk_busy_configure
tkinter.Misc.tk_busy_current
tkinter.Misc.tk_busy_forget
tkinter.Misc.tk_busy_hold
tkinter.Misc.tk_busy_status
# ====================================
# Pre-existing errors from Python 3.12
# ====================================

View File

@@ -371,6 +371,9 @@ class _GridIndexInfo(TypedDict, total=False):
uniform: str | None
weight: int
class _BusyInfo(TypedDict):
cursor: _Cursor
class Misc:
master: Misc | None
tk: _tkinter.TkappType
@@ -408,6 +411,25 @@ class Misc:
def after_info(self, id: str | None = None) -> tuple[str, ...]: ...
def bell(self, displayof: Literal[0] | Misc | None = 0) -> None: ...
if sys.version_info >= (3, 13):
# Supports options from `_BusyInfo``
def tk_busy_cget(self, option: Literal["cursor"]) -> _Cursor: ...
busy_cget = tk_busy_cget
def tk_busy_configure(self, cnf: Any = None, **kw: Any) -> Any: ...
tk_busy_config = tk_busy_configure
busy_configure = tk_busy_configure
busy_config = tk_busy_configure
def tk_busy_current(self, pattern: str | None = None) -> list[Misc]: ...
busy_current = tk_busy_current
def tk_busy_forget(self) -> None: ...
busy_forget = tk_busy_forget
def tk_busy_hold(self, **kw: Unpack[_BusyInfo]) -> None: ...
tk_busy = tk_busy_hold
busy_hold = tk_busy_hold
busy = tk_busy_hold
def tk_busy_status(self) -> bool: ...
busy_status = tk_busy_status
def clipboard_get(self, *, displayof: Misc = ..., type: str = ...) -> str: ...
def clipboard_clear(self, *, displayof: Misc = ...) -> None: ...
def clipboard_append(self, string: str, *, displayof: Misc = ..., format: str = ..., type: str = ...) -> None: ...