Skip to content

Commit 5cda422

Browse files
kitsuyuiJelleZijlstra
authored andcommitted
1 parent c6c8d7e commit 5cda422

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

stdlib/2and3/datetime.pyi

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,12 @@ class time:
8383
max: ClassVar[time]
8484
resolution: ClassVar[timedelta]
8585

86-
def __init__(self, hour: int = ..., minute: int = ..., second: int = ..., microsecond: int = ...,
87-
tzinfo: Optional[_tzinfo] = ...) -> None: ...
86+
if sys.version_info >= (3, 6):
87+
def __init__(self, hour: int = ..., minute: int = ..., second: int = ..., microsecond: int = ...,
88+
tzinfo: Optional[_tzinfo] = ..., *, fold: int = ...) -> None: ...
89+
else:
90+
def __init__(self, hour: int = ..., minute: int = ..., second: int = ..., microsecond: int = ...,
91+
tzinfo: Optional[_tzinfo] = ...) -> None: ...
8892

8993
@property
9094
def hour(self) -> int: ...
@@ -133,9 +137,14 @@ class timedelta(SupportsAbs[timedelta]):
133137
max: ClassVar[timedelta]
134138
resolution: ClassVar[timedelta]
135139

136-
def __init__(self, days: float = ..., seconds: float = ..., microseconds: float = ...,
137-
milliseconds: float = ..., minutes: float = ..., hours: float = ...,
138-
weeks: float = ...) -> None: ...
140+
if sys.version_info >= (3, 6):
141+
def __init__(self, days: float = ..., seconds: float = ..., microseconds: float = ...,
142+
milliseconds: float = ..., minutes: float = ..., hours: float = ...,
143+
weeks: float = ..., *, fold: int = ...) -> None: ...
144+
else:
145+
def __init__(self, days: float = ..., seconds: float = ..., microseconds: float = ...,
146+
milliseconds: float = ..., minutes: float = ..., hours: float = ...,
147+
weeks: float = ...) -> None: ...
139148

140149
@property
141150
def days(self) -> int: ...

0 commit comments

Comments
 (0)