mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Fixing timezone utc type (#568)
* switching to timezone type * taking a shot at 2.7
This commit is contained in:
committed by
Matthias Kramm
parent
76c0850eb2
commit
bbf0ac2d1f
@@ -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
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user