mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Replace str with bytes for imaplib append and ParseFlags (#8130)
Last Argument of APPEND https://github.com/python/cpython/blob/main/Lib/imaplib.py#L1497 https://github.com/python/cpython/blob/main/Lib/imaplib.py#L413 You can see it's parsed with the bytes regex MapCLRF re.compile(br'\r\n|\r|\n') https://github.com/python/cpython/blob/main/Lib/imaplib.py#L1497 You can see it's parsed with the bytes regex Flags re.compile(br'.*FLAGS \((?P<flags>[^\)]*)\)')
This commit is contained in:
@@ -55,7 +55,7 @@ class IMAP4:
|
||||
def socket(self) -> _socket: ...
|
||||
def recent(self) -> _CommandResults: ...
|
||||
def response(self, code: str) -> _CommandResults: ...
|
||||
def append(self, mailbox: str, flags: str, date_time: str, message: str) -> str: ...
|
||||
def append(self, mailbox: str, flags: str, date_time: str, message: bytes) -> str: ...
|
||||
def authenticate(self, mechanism: str, authobject: Callable[[bytes], bytes | None]) -> tuple[str, str]: ...
|
||||
def capability(self) -> _CommandResults: ...
|
||||
def check(self) -> _CommandResults: ...
|
||||
@@ -171,5 +171,5 @@ class _Authenticator:
|
||||
|
||||
def Internaldate2tuple(resp: bytes) -> time.struct_time: ...
|
||||
def Int2AP(num: int) -> str: ...
|
||||
def ParseFlags(resp: str) -> tuple[str, ...]: ...
|
||||
def ParseFlags(resp: bytes) -> tuple[bytes, ...]: ...
|
||||
def Time2Internaldate(date_time: float | time.struct_time | str) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user