@@ -6,7 +6,7 @@ from tkinter.constants import *
6
6
from tkinter .font import _FontDescription
7
7
from types import TracebackType
8
8
from typing import Any , Generic , NamedTuple , TypeVar , overload , type_check_only
9
- from typing_extensions import Literal , TypeAlias , TypedDict , deprecated
9
+ from typing_extensions import Literal , TypeAlias , TypedDict , TypeVarTuple , Unpack , deprecated
10
10
11
11
if sys .version_info >= (3 , 9 ):
12
12
__all__ = [
@@ -314,6 +314,8 @@ getdouble: Incomplete
314
314
315
315
def getboolean (s ): ...
316
316
317
+ _Ts = TypeVarTuple ("_Ts" )
318
+
317
319
class _GridIndexInfo (TypedDict , total = False ):
318
320
minsize : _ScreenUnits
319
321
pad : _ScreenUnits
@@ -349,9 +351,9 @@ class Misc:
349
351
def tk_focusPrev (self ) -> Misc | None : ...
350
352
# .after() can be called without the "func" argument, but it is basically never what you want.
351
353
# It behaves like time.sleep() and freezes the GUI app.
352
- def after (self , ms : int | Literal ["idle" ], func : Callable [... , object ], * args : Any ) -> str : ...
354
+ def after (self , ms : int | Literal ["idle" ], func : Callable [[ Unpack [ _Ts ]] , object ], * args : Unpack [ _Ts ] ) -> str : ...
353
355
# after_idle is essentially partialmethod(after, "idle")
354
- def after_idle (self , func : Callable [... , object ], * args : Any ) -> str : ...
356
+ def after_idle (self , func : Callable [[ Unpack [ _Ts ]] , object ], * args : Unpack [ _Ts ] ) -> str : ...
355
357
def after_cancel (self , id : str ) -> None : ...
356
358
def bell (self , displayof : Literal [0 ] | Misc | None = 0 ) -> None : ...
357
359
def clipboard_get (self , * , displayof : Misc = ..., type : str = ...) -> str : ...
0 commit comments