mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-10 02:19:18 +08:00
Enhance ZoneInfo.from_file stub (#14221)
Enhance ZoneInfo.from_file stub Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import sys
|
||||
from collections.abc import Iterable
|
||||
from datetime import datetime, timedelta, tzinfo
|
||||
from typing_extensions import Self
|
||||
@@ -17,8 +18,13 @@ class ZoneInfo(tzinfo):
|
||||
def __new__(cls, key: str) -> Self: ...
|
||||
@classmethod
|
||||
def no_cache(cls, key: str) -> Self: ...
|
||||
@classmethod
|
||||
def from_file(cls, fobj: _IOBytes, /, key: str | None = None) -> Self: ...
|
||||
if sys.version_info >= (3, 12):
|
||||
@classmethod
|
||||
def from_file(cls, file_obj: _IOBytes, /, key: str | None = None) -> Self: ...
|
||||
else:
|
||||
@classmethod
|
||||
def from_file(cls, fobj: _IOBytes, /, key: str | None = None) -> Self: ...
|
||||
|
||||
@classmethod
|
||||
def clear_cache(cls, *, only_keys: Iterable[str] | None = None) -> None: ...
|
||||
def tzname(self, dt: datetime | None, /) -> str | None: ...
|
||||
|
||||
Reference in New Issue
Block a user