Allow replace(tz_info=None) on time/datetime (#485)

* Allow replace(tz_info=None) on time/datetime

* Remove bool option for replace(tzinfo=...)
This commit is contained in:
Daniel F Moisset
2016-08-24 14:05:21 +01:00
committed by Matthias Kramm
parent 34175b888d
commit fac745c90b

View File

@@ -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: ...