From fac745c90b1d0f01fcc93d5a48722905cde0fe0b Mon Sep 17 00:00:00 2001 From: Daniel F Moisset Date: Wed, 24 Aug 2016 14:05:21 +0100 Subject: [PATCH] Allow replace(tz_info=None) on time/datetime (#485) * Allow replace(tz_info=None) on time/datetime * Remove bool option for replace(tzinfo=...) --- stdlib/3/datetime.pyi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stdlib/3/datetime.pyi b/stdlib/3/datetime.pyi index dd161a5f9..382a587b9 100644 --- a/stdlib/3/datetime.pyi +++ b/stdlib/3/datetime.pyi @@ -2,7 +2,7 @@ # NOTE: These are incomplete! -from typing import Optional, SupportsAbs, Tuple, Union, overload +from typing import Optional, SupportsAbs, Tuple, overload MINYEAR = 0 MAXYEAR = 0 @@ -97,7 +97,7 @@ class time: def tzname(self) -> Optional[str]: ... def dst(self) -> Optional[int]: ... def replace(self, hour: int = ..., minute: int = ..., second: int = ..., - microsecond: int = ..., tzinfo: Union[_tzinfo, bool] = ...) -> time: ... + microsecond: int = ..., tzinfo: _tzinfo = None) -> time: ... _date = date _time = time @@ -197,7 +197,7 @@ class datetime: def timetz(self) -> _time: ... def replace(self, year: int = ..., month: int = ..., day: int = ..., hour: int = ..., minute: int = ..., second: int = ..., microsecond: int = ..., tzinfo: - Union[_tzinfo, bool] = ...) -> datetime: ... + _tzinfo = None) -> datetime: ... def astimezone(self, tz: _tzinfo = ...) -> datetime: ... def ctime(self) -> str: ... def isoformat(self, sep: str = ...) -> str: ...