Skip to content

Commit d1d9b98

Browse files
jheissAlexWaygood
andauthored
imaplib.Time2Internaldate also takes datetimes and 9-element tuples (#8630)
Co-authored-by: Alex Waygood <[email protected]>
1 parent dece0b1 commit d1d9b98

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

stdlib/imaplib.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import time
44
from _typeshed import Self
55
from builtins import list as _list # conflicts with a method named "list"
66
from collections.abc import Callable
7+
from datetime import datetime
78
from re import Pattern
89
from socket import socket as _socket
910
from ssl import SSLContext, SSLSocket
@@ -159,4 +160,4 @@ class _Authenticator:
159160
def Internaldate2tuple(resp: bytes) -> time.struct_time: ...
160161
def Int2AP(num: int) -> str: ...
161162
def ParseFlags(resp: bytes) -> tuple[bytes, ...]: ...
162-
def Time2Internaldate(date_time: float | time.struct_time | str) -> str: ...
163+
def Time2Internaldate(date_time: float | time.struct_time | time._TimeTuple | datetime | str) -> str: ...

0 commit comments

Comments
 (0)