Add pytz basic typing (#383)

* Add pytz basic typing

* Add pytz.lazy basic typing

* Move the files to the correct path

* Move files to correct directory

* Ignore issue with different sig from supertype
This commit is contained in:
Fabian Heredia Montiel
2016-07-22 07:52:40 -05:00
committed by Matthias Kramm
parent e02332a787
commit 4a408c014f
2 changed files with 38 additions and 0 deletions

25
third_party/2and3/pytz/__init__.pyi vendored Normal file
View File

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

13
third_party/2and3/pytz/lazy.pyi vendored Normal file
View File

@@ -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