mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
committed by
Guido van Rossum
parent
8dc082dce5
commit
1350d7e4d2
@@ -3,7 +3,7 @@
|
||||
# NOTE: These are incomplete!
|
||||
|
||||
from time import struct_time
|
||||
from typing import Optional, SupportsAbs, Tuple, Union, overload
|
||||
from typing import AnyStr, Optional, SupportsAbs, Tuple, Union, overload
|
||||
|
||||
MINYEAR = 0
|
||||
MAXYEAR = 0
|
||||
@@ -39,7 +39,7 @@ class date(object):
|
||||
|
||||
def ctime(self) -> str: ...
|
||||
def strftime(self, fmt: Union[str, unicode]) -> str: ...
|
||||
def __format__(self, fmt: Union[str, unicode]) -> str: ...
|
||||
def __format__(self, fmt: AnyStr) -> AnyStr: ...
|
||||
def isoformat(self) -> str: ...
|
||||
def timetuple(self) -> struct_time: ...
|
||||
def toordinal(self) -> int: ...
|
||||
@@ -84,7 +84,7 @@ class time:
|
||||
def __hash__(self) -> int: ...
|
||||
def isoformat(self) -> str: ...
|
||||
def strftime(self, fmt: Union[str, unicode]) -> str: ...
|
||||
def __format__(self, fmt: str) -> str: ...
|
||||
def __format__(self, fmt: AnyStr) -> AnyStr: ...
|
||||
def utcoffset(self) -> Optional[timedelta]: ...
|
||||
def tzname(self) -> Optional[str]: ...
|
||||
def dst(self) -> Optional[int]: ...
|
||||
@@ -114,7 +114,7 @@ class timedelta(SupportsAbs[timedelta]):
|
||||
def __add__(self, other: timedelta) -> timedelta: ...
|
||||
def __radd__(self, other: timedelta) -> timedelta: ...
|
||||
def __sub__(self, other: timedelta) -> timedelta: ...
|
||||
def __rsub(self, other: timedelta) -> timedelta: ...
|
||||
def __rsub__(self, other: timedelta) -> timedelta: ...
|
||||
def __neg__(self) -> timedelta: ...
|
||||
def __pos__(self) -> timedelta: ...
|
||||
def __abs__(self) -> timedelta: ...
|
||||
@@ -135,7 +135,7 @@ class timedelta(SupportsAbs[timedelta]):
|
||||
def __hash__(self) -> int: ...
|
||||
|
||||
class datetime(object):
|
||||
# TODO: is actually subclass of date, but __le__, __lt__, __ge__, __gt__ don't work with date.
|
||||
# TODO: is actually subclass of date, but __le__, __lt__, __ge__, __gt__, __sub__ don't work with date.
|
||||
min = ... # type: datetime
|
||||
max = ... # type: datetime
|
||||
resolution = ... # type: timedelta
|
||||
@@ -176,7 +176,7 @@ class datetime(object):
|
||||
@classmethod
|
||||
def combine(cls, date: date, time: time) -> datetime: ...
|
||||
def strftime(self, fmt: Union[str, unicode]) -> str: ...
|
||||
def __format__(self, fmt: str) -> str: ...
|
||||
def __format__(self, fmt: AnyStr) -> AnyStr: ...
|
||||
def toordinal(self) -> int: ...
|
||||
def timetuple(self) -> struct_time: ...
|
||||
def utctimetuple(self) -> struct_time: ...
|
||||
|
||||
Reference in New Issue
Block a user