mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-21 11:21:19 +08:00
Expand several stdlib methods to accept unicode or str. (#869)
Expand several stdlib methods to accept unicode or str.
This commit is contained in:
committed by
Jukka Lehtosalo
parent
c8435f4315
commit
6d1edb285d
@@ -38,7 +38,7 @@ class date(object):
|
||||
def day(self) -> int: ...
|
||||
|
||||
def ctime(self) -> str: ...
|
||||
def strftime(self, fmt: str) -> str: ...
|
||||
def strftime(self, fmt: Union[str, unicode]) -> str: ...
|
||||
def __format__(self, fmt: Union[str, unicode]) -> str: ...
|
||||
def isoformat(self) -> str: ...
|
||||
def timetuple(self) -> struct_time: ...
|
||||
@@ -83,7 +83,7 @@ class time:
|
||||
def __gt__(self, other: time) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def isoformat(self) -> str: ...
|
||||
def strftime(self, fmt: str) -> str: ...
|
||||
def strftime(self, fmt: Union[str, unicode]) -> str: ...
|
||||
def __format__(self, fmt: str) -> str: ...
|
||||
def utcoffset(self) -> Optional[timedelta]: ...
|
||||
def tzname(self) -> Optional[str]: ...
|
||||
@@ -177,7 +177,7 @@ class datetime(object):
|
||||
def utcnow(cls) -> datetime: ...
|
||||
@classmethod
|
||||
def combine(cls, date: date, time: time) -> datetime: ...
|
||||
def strftime(self, fmt: str) -> str: ...
|
||||
def strftime(self, fmt: Union[str, unicode]) -> str: ...
|
||||
def __format__(self, fmt: str) -> str: ...
|
||||
def toordinal(self) -> int: ...
|
||||
def timetuple(self) -> struct_time: ...
|
||||
@@ -193,7 +193,7 @@ class datetime(object):
|
||||
def ctime(self) -> str: ...
|
||||
def isoformat(self, sep: str = ...) -> str: ...
|
||||
@classmethod
|
||||
def strptime(cls, date_string: str, format: str) -> datetime: ...
|
||||
def strptime(cls, date_string: Union[str, unicode], format: Union[str, unicode]) -> datetime: ...
|
||||
def utcoffset(self) -> Optional[timedelta]: ...
|
||||
def tzname(self) -> Optional[str]: ...
|
||||
def dst(self) -> Optional[int]: ...
|
||||
|
||||
Reference in New Issue
Block a user