FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

tkinter: add info_patchlevel for 3.11 by JelleZijlstra · Pull Request #7794 · python/typeshed · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .pyi  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
13 changes: 12 additions & 1 deletion stdlib/tkinter/__init__.pyi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Back | FazBrowse Home | New Git URL