Add @disjoint_base decorator in the stdlib (#14599)

And fix some other new stubtest finds.
This commit is contained in:
Jelle Zijlstra
2025-08-24 07:27:14 -07:00
committed by GitHub
parent 2565f34946
commit e8ba06f710
55 changed files with 701 additions and 307 deletions
+6 -2
View File
@@ -6,7 +6,7 @@ from tkinter.constants import *
from tkinter.font import _FontDescription
from types import GenericAlias, TracebackType
from typing import Any, ClassVar, Final, Generic, Literal, NamedTuple, Protocol, TypedDict, TypeVar, overload, type_check_only
from typing_extensions import TypeAlias, TypeVarTuple, Unpack, deprecated
from typing_extensions import TypeAlias, TypeVarTuple, Unpack, deprecated, disjoint_base
if sys.version_info >= (3, 11):
from enum import StrEnum
@@ -198,7 +198,11 @@ if sys.version_info >= (3, 11):
releaselevel: str
serial: int
class _VersionInfoType(_VersionInfoTypeBase): ...
if sys.version_info >= (3, 12):
class _VersionInfoType(_VersionInfoTypeBase): ...
else:
@disjoint_base
class _VersionInfoType(_VersionInfoTypeBase): ...
if sys.version_info >= (3, 11):
class EventType(StrEnum):