mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Add timespec parameter to datetime.datetime.isoformat for Python 3.6+. (#1349)
This commit is contained in:
committed by
Jelle Zijlstra
parent
875b02e374
commit
1ebcc1d11f
@@ -1,3 +1,4 @@
|
||||
import sys
|
||||
from typing import Optional, SupportsAbs, Tuple, overload
|
||||
|
||||
MINYEAR = 0
|
||||
@@ -198,7 +199,10 @@ class datetime:
|
||||
Optional[_tzinfo] = None) -> datetime: ...
|
||||
def astimezone(self, tz: Optional[_tzinfo] = ...) -> datetime: ...
|
||||
def ctime(self) -> str: ...
|
||||
def isoformat(self, sep: str = ...) -> str: ...
|
||||
if sys.version_info >= (3, 6):
|
||||
def isoformat(self, sep: str = ..., timespec: str = ...) -> str: ...
|
||||
else:
|
||||
def isoformat(self, sep: str = ...) -> str: ...
|
||||
@classmethod
|
||||
def strptime(cls, date_string: str, format: str) -> datetime: ...
|
||||
def utcoffset(self) -> Optional[timedelta]: ...
|
||||
|
||||
Reference in New Issue
Block a user