@@ -6,7 +6,7 @@ from enum import Enum
6
6
from tkinter .constants import *
7
7
from tkinter .font import _FontDescription
8
8
from types import TracebackType
9
- from typing import Any , Generic , Protocol , TypeVar , Union , overload
9
+ from typing import Any , Generic , NamedTuple , Protocol , TypeVar , Union , overload
10
10
from typing_extensions import Literal , TypeAlias , TypedDict
11
11
12
12
if sys .version_info >= (3 , 9 ):
@@ -198,6 +198,14 @@ _ScreenUnits: TypeAlias = str | float # Often the right type instead of int. Ma
198
198
_XYScrollCommand : TypeAlias = str | Callable [[float , float ], Any ] # -xscrollcommand and -yscrollcommand in 'options' manual page
199
199
_TakeFocusValue : TypeAlias = Union [int , Literal ["" ], Callable [[str ], bool | None ]] # -takefocus in manual page named 'options'
200
200
201
+ if sys .version_info >= (3 , 11 ):
202
+ class _VersionInfoType (NamedTuple ):
203
+ major : int
204
+ minor : int
205
+ micro : int
206
+ releaselevel : str
207
+ serial : int
208
+
201
209
class EventType (str , Enum ):
202
210
Activate : str
203
211
ButtonPress : str
@@ -377,6 +385,9 @@ class Misc:
377
385
def lower (self , belowThis : Any | None = ...) -> None : ...
378
386
def tkraise (self , aboveThis : Any | None = ...) -> None : ...
379
387
lift = tkraise
388
+ if sys .version_info >= (3 , 11 ):
389
+ def info_patchlevel (self ) -> _VersionInfoType : ...
390
+
380
391
def winfo_atom (self , name : str , displayof : Literal [0 ] | Misc | None = ...) -> int : ...
381
392
def winfo_atomname (self , id : int , displayof : Literal [0 ] | Misc | None = ...) -> str : ...
382
393
def winfo_cells (self ) -> int : ...
0 commit comments