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
+2 -1
View File
@@ -1,7 +1,7 @@
import sys
from collections.abc import Iterable
from datetime import datetime, timedelta, tzinfo
from typing_extensions import Self
from typing_extensions import Self, disjoint_base
from zoneinfo._common import ZoneInfoNotFoundError as ZoneInfoNotFoundError, _IOBytes
from zoneinfo._tzpath import (
TZPATH as TZPATH,
@@ -12,6 +12,7 @@ from zoneinfo._tzpath import (
__all__ = ["ZoneInfo", "reset_tzpath", "available_timezones", "TZPATH", "ZoneInfoNotFoundError", "InvalidTZPathWarning"]
@disjoint_base
class ZoneInfo(tzinfo):
@property
def key(self) -> str: ...