mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-25 20:36:44 +08:00
Use typing_extensions.Self in the stdlib (#9694)
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
from _typeshed import Self, StrPath
|
||||
from _typeshed import StrPath
|
||||
from collections.abc import Iterable, Sequence
|
||||
from datetime import datetime, timedelta, tzinfo
|
||||
from typing import Any, Protocol
|
||||
from typing_extensions import Self
|
||||
|
||||
__all__ = ["ZoneInfo", "reset_tzpath", "available_timezones", "TZPATH", "ZoneInfoNotFoundError", "InvalidTZPathWarning"]
|
||||
|
||||
@@ -14,9 +15,9 @@ class ZoneInfo(tzinfo):
|
||||
def key(self) -> str: ...
|
||||
def __init__(self, key: str) -> None: ...
|
||||
@classmethod
|
||||
def no_cache(cls: type[Self], key: str) -> Self: ...
|
||||
def no_cache(cls, key: str) -> Self: ...
|
||||
@classmethod
|
||||
def from_file(cls: type[Self], __fobj: _IOBytes, key: str | None = ...) -> Self: ...
|
||||
def from_file(cls, __fobj: _IOBytes, key: str | None = ...) -> Self: ...
|
||||
@classmethod
|
||||
def clear_cache(cls, *, only_keys: Iterable[str] | None = ...) -> None: ...
|
||||
def tzname(self, __dt: datetime | None) -> str | None: ...
|
||||
|
||||
Reference in New Issue
Block a user