mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Fix types for timetuple and utctimetuple
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user