massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stdlib / zoneinfo / __init__.pyi
diff --git a/.config/coc/extensions/node_modules/coc-pyright/node_modules/pyright/dist/typeshed-fallback/stdlib/zoneinfo/__init__.pyi b/.config/coc/extensions/node_modules/coc-pyright/node_modules/pyright/dist/typeshed-fallback/stdlib/zoneinfo/__init__.pyi
new file mode 100644 (file)
index 0000000..4f924e0
--- /dev/null
@@ -0,0 +1,32 @@
+import typing
+from _typeshed import StrPath
+from datetime import tzinfo
+from typing import Any, Iterable, Protocol, Sequence, Type
+
+_T = typing.TypeVar("_T", bound="ZoneInfo")
+
+class _IOBytes(Protocol):
+    def read(self, __size: int) -> bytes: ...
+    def seek(self, __size: int, __whence: int = ...) -> Any: ...
+
+class ZoneInfo(tzinfo):
+    @property
+    def key(self) -> str: ...
+    def __init__(self, key: str) -> None: ...
+    @classmethod
+    def no_cache(cls: Type[_T], key: str) -> _T: ...
+    @classmethod
+    def from_file(cls: Type[_T], __fobj: _IOBytes, key: str | None = ...) -> _T: ...
+    @classmethod
+    def clear_cache(cls, *, only_keys: Iterable[str] = ...) -> None: ...
+
+# Note: Both here and in clear_cache, the types allow the use of `str` where
+# a sequence of strings is required. This should be remedied if a solution
+# to this typing bug is found: https://github.com/python/typing/issues/256
+def reset_tzpath(to: Sequence[StrPath] | None = ...) -> None: ...
+def available_timezones() -> set[str]: ...
+
+TZPATH: Sequence[str]
+
+class ZoneInfoNotFoundError(KeyError): ...
+class InvalidTZPathWarning(RuntimeWarning): ...