mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Use __new__ for datetime.timedelta (#5532)
This commit is contained in:
@@ -139,8 +139,8 @@ class timedelta(SupportsAbs[timedelta]):
|
||||
min: ClassVar[timedelta]
|
||||
max: ClassVar[timedelta]
|
||||
resolution: ClassVar[timedelta]
|
||||
def __init__(
|
||||
self,
|
||||
def __new__(
|
||||
cls: Type[_S],
|
||||
days: float = ...,
|
||||
seconds: float = ...,
|
||||
microseconds: float = ...,
|
||||
@@ -148,9 +148,7 @@ class timedelta(SupportsAbs[timedelta]):
|
||||
minutes: float = ...,
|
||||
hours: float = ...,
|
||||
weeks: float = ...,
|
||||
*,
|
||||
fold: int = ...,
|
||||
) -> None: ...
|
||||
) -> _S: ...
|
||||
@property
|
||||
def days(self) -> int: ...
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user