python-dateutil: Add zoneinfo submodule (#9381)

This commit is contained in:
Alex Waygood
2022-12-18 17:14:05 +00:00
committed by GitHub
parent 805452f896
commit 0e41136f5a
2 changed files with 28 additions and 0 deletions

View 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: ...

View 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: ...