mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
python-dateutil: Add zoneinfo submodule (#9381)
This commit is contained in:
17
stubs/python-dateutil/dateutil/zoneinfo/__init__.pyi
Normal file
17
stubs/python-dateutil/dateutil/zoneinfo/__init__.pyi
Normal file
@@ -0,0 +1,17 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import IO
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
__all__ = ["get_zonefile_instance", "gettz", "gettz_db_metadata"]
|
||||
|
||||
_MetadataType: TypeAlias = dict[str, Incomplete]
|
||||
|
||||
class ZoneInfoFile:
|
||||
zones: dict[Incomplete, Incomplete]
|
||||
metadata: _MetadataType | None
|
||||
def __init__(self, zonefile_stream: IO[bytes] | None = ...) -> None: ...
|
||||
def get(self, name, default: Incomplete | None = ...): ...
|
||||
|
||||
def get_zonefile_instance(new_instance: bool = ...) -> ZoneInfoFile: ...
|
||||
def gettz(name): ...
|
||||
def gettz_db_metadata() -> _MetadataType: ...
|
||||
11
stubs/python-dateutil/dateutil/zoneinfo/rebuild.pyi
Normal file
11
stubs/python-dateutil/dateutil/zoneinfo/rebuild.pyi
Normal file
@@ -0,0 +1,11 @@
|
||||
from _typeshed import Incomplete, StrOrBytesPath
|
||||
from collections.abc import Sequence
|
||||
from tarfile import TarInfo
|
||||
|
||||
def rebuild(
|
||||
filename: StrOrBytesPath,
|
||||
tag: Incomplete | None = ...,
|
||||
format: str = ...,
|
||||
zonegroups: Sequence[str | TarInfo] = ...,
|
||||
metadata: Incomplete | None = ...,
|
||||
) -> None: ...
|
||||
Reference in New Issue
Block a user