8000 tkinter: add info_patchlevel for 3.11 by JelleZijlstra · Pull Request #7794 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

tkinter: add info_patchlevel for 3.11 #7794

8000 New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 7, 2022
Merged
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
13 changes: 12 additions & 1 deletion stdlib/tkinter/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ from enum import Enum
from tkinter.constants import *
from tkinter.font import _FontDescription
from types import TracebackType
from typing import Any, Generic, Protocol, TypeVar, Union, overload
from typing import Any, Generic, NamedTuple, Protocol, TypeVar, Union, overload
from typing_extensions import Literal, TypeAlias, TypedDict

if sys.version_info >= (3, 9):
Expand Down Expand Up @@ -198,6 +198,14 @@ _ScreenUnits: TypeAlias = str | float # Often the right type instead of int. Ma
_XYScrollCommand: TypeAlias = str | Callable[[float, float], Any] # -xscrollcommand and -yscrollcommand in 'options' manual page
_TakeFocusValue: TypeAlias = Union[int, Literal[""], Callable[[str], bool | None]] # -takefocus in manual page named 'options'

if sys.version_info >= (3, 11):
class _VersionInfoType(NamedTuple):
major: int
minor: int
micro: int
releaselevel: str
serial: int

class EventType(str, Enum):
Activate: str
ButtonPress: str
Expand Down Expand Up @@ -377,6 +385,9 @@ class Misc:
def lower(self, belowThis: Any | None = ...) -> None: ...
def tkraise(self, aboveThis: Any | None = ...) -> None: ...
lift = tkraise
if sys.version_info >= (3, 11):
def info_patchlevel(self) -> _VersionInfoType: ...

def winfo_atom(self, name: str, displayof: Literal[0] | Misc | None = ...) -> int: ...
def winfo_atomname(self, id: int, displayof: Literal[0] | Misc | None = ...) -> str: ...
def winfo_cells(self) -> int: ...
Expand Down
0