mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
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:
committed by
Matthias Kramm
parent
34175b888d
commit
fac745c90b
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user