From 4b8c6bbea18f050150a70ec12d6f1289ca348fb7 Mon Sep 17 00:00:00 2001 From: bianca rosa Date: Fri, 1 Nov 2019 07:25:15 -0300 Subject: [PATCH] add timespec arg to datetime.time.isoformat (#3432) Close #3431 --- stdlib/2and3/datetime.pyi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stdlib/2and3/datetime.pyi b/stdlib/2and3/datetime.pyi index 772b8398f..a721cb765 100644 --- a/stdlib/2and3/datetime.pyi +++ b/stdlib/2and3/datetime.pyi @@ -114,7 +114,10 @@ class time: def __ge__(self, other: time) -> bool: ... def __gt__(self, other: time) -> bool: ... def __hash__(self) -> int: ... - def isoformat(self) -> str: ... + if sys.version_info >= (3, 6): + def isoformat(self, timespec: str = ...) -> str: ... + else: + def isoformat(self) -> str: ... if sys.version_info >= (3, 7): @classmethod def fromisoformat(cls: Type[_S], time_string: str) -> _S: ...