Fix types for timetuple and utctimetuple

This commit is contained in:
Matthew Wright
2016-01-07 15:45:01 -08:00
parent 5cf2fa45b8
commit 72e8813a1a

View File

@@ -2,6 +2,7 @@
# NOTE: These are incomplete!
from time import struct_time
from typing import Optional, SupportsAbs, Tuple, Union, overload
MINYEAR = 0
@@ -49,7 +50,7 @@ class date(object):
def strftime(self, fmt: str) -> str: ...
def __format__(self, fmt: Union[str, unicode]) -> str: ...
def isoformat(self) -> str: ...
def timetuple(self) -> tuple: ... # TODO return type
def timetuple(self) -> struct_time: ...
def toordinal(self) -> int: ...
def replace(self, year: int = ..., month: int = ..., day: int = ...) -> date: ...
def __le__(self, other: date) -> bool: ...
@@ -188,10 +189,9 @@ class datetime(object):
def strftime(self, fmt: str) -> str: ...
def __format__(self, fmt: str) -> str: ...
def toordinal(self) -> int: ...
def timetuple(self) -> tuple: ... # TODO return type
def timetuple(self) -> struct_time: ...
def timestamp(self) -> float: ...
def utctimetuple(self) -> tuple: # TODO return type
raise OverflowError()
def utctimetuple(self) -> struct_time: ...
def date(self) -> _date: ...
def time(self) -> _time: ...
def timetz(self) -> _time: ...