Skip to content
Open
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
40 changes: 20 additions & 20 deletions stdlib/_tkinter.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -54,34 +54,34 @@ _TkinterTraceFunc: TypeAlias = Callable[[tuple[str, ...]], object]
@final
class TkappType:
# Please keep in sync with tkinter.Tk
def adderrorinfo(self, msg, /): ...
def adderrorinfo(self, msg: str, /): ...
def call(self, command: Any, /, *args: Any) -> Any: ...
def createcommand(self, name, func, /): ...
def createcommand(self, name: str, func, /): ...
if sys.platform != "win32":
def createfilehandler(self, file, mask, func, /): ...
def deletefilehandler(self, file, /): ...
def createfilehandler(self, file, mask: int, func, /): ...
def deletefilehandler(self, file, /) -> None: ...

def createtimerhandler(self, milliseconds, func, /): ...
def deletecommand(self, name, /): ...
def createtimerhandler(self, milliseconds: int, func, /): ...
def deletecommand(self, name: str, /): ...
def dooneevent(self, flags: int = 0, /): ...
def eval(self, script: str, /) -> str: ...
def evalfile(self, fileName, /): ...
def exprboolean(self, s, /): ...
def exprdouble(self, s, /): ...
def exprlong(self, s, /): ...
def exprstring(self, s, /): ...
def getboolean(self, arg, /): ...
def getdouble(self, arg, /): ...
def getint(self, arg, /): ...
def evalfile(self, fileName: str, /): ...
def exprboolean(self, s: str, /): ...
def exprdouble(self, s: str, /): ...
def exprlong(self, s: str, /): ...
def exprstring(self, s: str, /): ...
def getboolean(self, arg, /) -> bool: ...
def getdouble(self, arg, /) -> float: ...
def getint(self, arg, /) -> int: ...
def getvar(self, *args, **kwargs): ...
def globalgetvar(self, *args, **kwargs): ...
def globalsetvar(self, *args, **kwargs): ...
def globalunsetvar(self, *args, **kwargs): ...
def interpaddr(self) -> int: ...
def loadtk(self) -> None: ...
def mainloop(self, threshold: int = 0, /): ...
def quit(self): ...
def record(self, script, /): ...
def mainloop(self, threshold: int = 0, /) -> None: ...
def quit(self) -> None: ...
def record(self, script: str, /): ...
def setvar(self, *ags, **kwargs): ...
if sys.version_info < (3, 11):
@deprecated("Deprecated since Python 3.9; removed in Python 3.11. Use `splitlist()` instead.")
Expand All @@ -90,7 +90,7 @@ class TkappType:
def splitlist(self, arg, /): ...
def unsetvar(self, *args, **kwargs): ...
def wantobjects(self, *args, **kwargs): ...
def willdispatch(self): ...
def willdispatch(self) -> None: ...
if sys.version_info >= (3, 12):
def gettrace(self, /) -> _TkinterTraceFunc | None: ...
def settrace(self, func: _TkinterTraceFunc | None, /) -> None: ...
Expand Down Expand Up @@ -140,5 +140,5 @@ else:
/,
): ...

def getbusywaitinterval(): ...
def setbusywaitinterval(new_val, /): ...
def getbusywaitinterval() -> int: ...
def setbusywaitinterval(new_val: int, /) -> None: ...
69 changes: 34 additions & 35 deletions stdlib/tkinter/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -329,12 +329,12 @@ class Variable:
@deprecated("Deprecated since Python 3.14. Use `trace_remove()` instead.")
def trace_vdelete(self, mode, cbname) -> None: ...
@deprecated("Deprecated since Python 3.14. Use `trace_info()` instead.")
def trace_vinfo(self): ...
def trace_vinfo(self) -> list[Incomplete]: ...
else:
def trace(self, mode, callback) -> str: ...
def trace_variable(self, mode, callback) -> str: ...
def trace_vdelete(self, mode, cbname) -> None: ...
def trace_vinfo(self): ...
def trace_vinfo(self) -> list[Incomplete]: ...

def __eq__(self, other: object) -> bool: ...
def __del__(self) -> None: ...
Expand Down Expand Up @@ -369,7 +369,7 @@ def mainloop(n: int = 0) -> None: ...
getint = int
getdouble = float

def getboolean(s): ...
def getboolean(s) -> bool: ...

_Ts = TypeVarTuple("_Ts")

Expand Down Expand Up @@ -399,9 +399,9 @@ class Misc:
def wait_visibility(self, window: Misc | None = None) -> None: ...
def setvar(self, name: str = "PY_VAR", value: str = "1") -> None: ...
def getvar(self, name: str = "PY_VAR"): ...
def getint(self, s): ...
def getdouble(self, s): ...
def getboolean(self, s): ...
def getint(self, s) -> int: ...
def getdouble(self, s) -> float: ...
def getboolean(self, s) -> bool: ...
def focus_set(self) -> None: ...
focus = focus_set
def focus_force(self) -> None: ...
Expand Down Expand Up @@ -677,7 +677,7 @@ class XView:
@overload
def xview(self) -> tuple[float, float]: ...
@overload
def xview(self, *args): ...
def xview(self, *args) -> None: ...
def xview_moveto(self, fraction: float) -> None: ...
@overload
def xview_scroll(self, number: int, what: Literal["units", "pages"]) -> None: ...
Expand All @@ -688,7 +688,7 @@ class YView:
@overload
def yview(self) -> tuple[float, float]: ...
@overload
def yview(self, *args): ...
def yview(self, *args) -> None: ...
def yview_moveto(self, fraction: float) -> None: ...
@overload
def yview_scroll(self, number: int, what: Literal["units", "pages"]) -> None: ...
Expand Down Expand Up @@ -1014,35 +1014,35 @@ class Tk(Misc, Wm):
# Tk has __getattr__ so that tk_instance.foo falls back to tk_instance.tk.foo
# Please keep in sync with _tkinter.TkappType.
# Some methods are intentionally missing because they are inherited from Misc instead.
def adderrorinfo(self, msg, /): ...
def adderrorinfo(self, msg: str, /): ...
def call(self, command: Any, /, *args: Any) -> Any: ...
def createcommand(self, name, func, /): ...
def createcommand(self, name: str, func, /): ...
if sys.platform != "win32":
def createfilehandler(self, file, mask, func, /): ...
def deletefilehandler(self, file, /): ...
def createfilehandler(self, file, mask: int, func, /): ...
def deletefilehandler(self, file, /) -> None: ...

def createtimerhandler(self, milliseconds, func, /): ...
def dooneevent(self, flags: int = ..., /): ...
def createtimerhandler(self, milliseconds: int, func, /): ...
def dooneevent(self, flags: int = 0, /): ...
def eval(self, script: str, /) -> str: ...
def evalfile(self, fileName, /): ...
def exprboolean(self, s, /): ...
def exprdouble(self, s, /): ...
def exprlong(self, s, /): ...
def exprstring(self, s, /): ...
def evalfile(self, fileName: str, /): ...
def exprboolean(self, s: str, /): ...
def exprdouble(self, s: str, /): ...
def exprlong(self, s: str, /): ...
def exprstring(self, s: str, /): ...
def globalgetvar(self, *args, **kwargs): ...
def globalsetvar(self, *args, **kwargs): ...
def globalunsetvar(self, *args, **kwargs): ...
def interpaddr(self) -> int: ...
def loadtk(self) -> None: ...
def record(self, script, /): ...
def record(self, script: str, /): ...
if sys.version_info < (3, 11):
@deprecated("Deprecated since Python 3.9; removed in Python 3.11. Use `splitlist()` instead.")
def split(self, arg, /): ...

def splitlist(self, arg, /): ...
def unsetvar(self, *args, **kwargs): ...
def wantobjects(self, *args, **kwargs): ...
def willdispatch(self): ...
def willdispatch(self) -> None: ...

def Tcl(screenName: str | None = None, baseName: str | None = None, className: str = "Tk", useTk: bool = False) -> Tk: ...

Expand Down Expand Up @@ -1166,8 +1166,8 @@ class Grid:

class BaseWidget(Misc):
master: Misc
widgetName: Incomplete
def __init__(self, master, widgetName, cnf={}, kw={}, extra=()) -> None: ...
widgetName: str
def __init__(self, master, widgetName: str, cnf={}, kw={}, extra=()) -> None: ...
def destroy(self) -> None: ...

# This class represents any widget except Toplevel or Tk.
Expand Down Expand Up @@ -3555,7 +3555,7 @@ class Text(Widget, XView, YView):
fgstipple: str = ...,
font: _FontDescription = ...,
foreground: str = ...,
justify: Literal["left", "right", "center"] = ...,
justify: Literal["left", "center", "right"] = ...,
lmargin1: _ScreenUnits = ...,
lmargin2: _ScreenUnits = ...,
lmargincolor: str = ...,
Expand Down Expand Up @@ -3639,7 +3639,6 @@ class _setit:

# manual page: tk_optionMenu
class OptionMenu(Menubutton):
widgetName: Incomplete
menuname: Incomplete
def __init__(
# differs from other widgets
Expand Down Expand Up @@ -4078,19 +4077,19 @@ class PanedWindow(Widget):
config = configure
def add(self, child: Widget, **kw) -> None: ...
def remove(self, child) -> None: ...
forget: Incomplete
forget = remove # type: ignore[assignment]
def identify(self, x: int, y: int): ...
def proxy(self, *args): ...
def proxy_coord(self): ...
def proxy_forget(self): ...
def proxy_place(self, x, y): ...
def sash(self, *args): ...
def sash_coord(self, index): ...
def sash_mark(self, index): ...
def sash_place(self, index, x, y): ...
def proxy(self, *args) -> tuple[Incomplete, ...]: ...
def proxy_coord(self) -> tuple[Incomplete, ...]: ...
def proxy_forget(self) -> tuple[Incomplete, ...]: ...
def proxy_place(self, x, y) -> tuple[Incomplete, ...]: ...
def sash(self, *args) -> tuple[Incomplete, ...]: ...
def sash_coord(self, index) -> tuple[Incomplete, ...]: ...
def sash_mark(self, index) -> tuple[Incomplete, ...]: ...
def sash_place(self, index, x, y) -> tuple[Incomplete, ...]: ...
def panecget(self, child, option): ...
def paneconfigure(self, tagOrId, cnf=None, **kw): ...
paneconfig: Incomplete
paneconfig = paneconfigure
def panes(self): ...

def _test() -> None: ...
Loading