diff --git a/third_party/2and3/pytz/__init__.pyi b/third_party/2and3/pytz/__init__.pyi new file mode 100644 index 000000000..dc9c8fc4a --- /dev/null +++ b/third_party/2and3/pytz/__init__.pyi @@ -0,0 +1,25 @@ +# Stubs for pytz (Python 3.5) + +import datetime as dt +from typing import Optional, List, Set, Dict # NOQA + +all_timezones = ... # type: List +all_timezones_set = ... # type: Set +common_timezones = ... # type: List +common_timezones_set = ... # type: Set +country_timezones = ... # type: Dict +country_names = ... # type: Dict + + +class UTC(dt.tzinfo): + zone = ... # type: str + def fromutc(self, dt: dt.datetime) -> dt.datetime: ... + def utcoffset(self, dt: Optional[dt.datetime]) -> dt.timedelta: ... # type: ignore + def tzname(self, dt: Optional[dt.datetime]) -> str: ... + def dst(self, dt: Optional[dt.datetime]) -> dt.timedelta: ... # type: ignore + def localize(self, dt: dt.datetime, is_dst: bool=...) -> dt.datetime: ... + def normalize(self, dt: dt.datetime, is_dst: bool=...) -> dt.datetime: ... + +utc = ... # type: UTC + +def timezone(zone: str) -> UTC: ... diff --git a/third_party/2and3/pytz/lazy.pyi b/third_party/2and3/pytz/lazy.pyi new file mode 100644 index 000000000..3618333e0 --- /dev/null +++ b/third_party/2and3/pytz/lazy.pyi @@ -0,0 +1,13 @@ +# Stubs for pytz.lazy (Python 3.5) + +from typing import Any, Iterable, List, Set, Dict # NOQA +from collections import Mapping + +class LazyDict(Mapping): + pass + +class LazyList(List): + pass + +class LazySet(Set): + pass