Fixing timezone utc type (#568)

* switching to timezone type

* taking a shot at 2.7
This commit is contained in:
dlinnemeyer
2016-09-23 07:39:52 -05:00
committed by Matthias Kramm
parent 76c0850eb2
commit bbf0ac2d1f
2 changed files with 4 additions and 13 deletions

View File

@@ -14,16 +14,7 @@ class tzinfo(object):
def dst(self, dt: Optional[datetime]) -> Optional[timedelta]: ...
def fromutc(self, dt: datetime) -> datetime: ...
class timezone(tzinfo):
utc = ... # type: tzinfo
min = ... # type: tzinfo
max = ... # type: tzinfo
def __init__(self, offset: timedelta, name: str = ...) -> None: ...
def __hash__(self) -> int: ...
_tzinfo = tzinfo
_timezone = timezone
class date(object):
min = ... # type: date
@@ -173,7 +164,7 @@ class datetime(object):
def tzinfo(self) -> _tzinfo: ...
@classmethod
def fromtimestamp(cls, t: float, tz: timezone = ...) -> datetime: ...
def fromtimestamp(cls, t: float, tz: _tzinfo = ...) -> datetime: ...
@classmethod
def utcfromtimestamp(cls, t: float) -> datetime: ...
@classmethod

View File

@@ -14,9 +14,9 @@ class tzinfo:
def fromutc(self, dt: datetime) -> datetime: ...
class timezone(tzinfo):
utc = ... # type: tzinfo
min = ... # type: tzinfo
max = ... # type: tzinfo
utc = ... # type: timezone
min = ... # type: timezone
max = ... # type: timezone
def __init__(self, offset: timedelta, name: str = ...) -> None: ...
def __hash__(self) -> int: ...