Skip to content

Commit 4fd1d54

Browse files
committed
Annotate wantobjects
1 parent 3caf2eb commit 4fd1d54

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

stdlib/_tkinter.pyi

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import sys
22
from _typeshed import FileDescriptorLike, Incomplete
33
from collections.abc import Callable
4-
from typing import Any, ClassVar, Final, final
4+
from typing import Any, ClassVar, Final, final, overload
55
from typing_extensions import TypeAlias, deprecated
66

77
# _tkinter is meant to be only used internally by tkinter, but some tkinter
@@ -90,7 +90,10 @@ class TkappType:
9090

9191
def splitlist(self, arg, /) -> tuple[Incomplete, ...]: ...
9292
def unsetvar(self, *args, **kwargs): ...
93-
def wantobjects(self, *args, **kwargs): ...
93+
@overload
94+
def wantobjects(self) -> int: ...
95+
@overload
96+
def wantobjects(self, wantobjects: int, /) -> None: ...
9497
def willdispatch(self) -> None: ...
9598
if sys.version_info >= (3, 12):
9699
def gettrace(self, /) -> _TkinterTraceFunc | None: ...

stdlib/tkinter/__init__.pyi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,10 @@ class Tk(Misc, Wm):
10321032

10331033
def splitlist(self, arg, /) -> tuple[Incomplete, ...]: ...
10341034
def unsetvar(self, *args, **kwargs): ...
1035-
def wantobjects(self, *args, **kwargs): ...
1035+
@overload
1036+
def wantobjects(self) -> int: ...
1037+
@overload
1038+
def wantobjects(self, wantobjects: int, /) -> None: ...
10361039
def willdispatch(self) -> None: ...
10371040

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

0 commit comments

Comments
 (0)