|
1 | 1 | import subprocess
|
2 | 2 | import sys
|
3 | 3 | import time
|
4 |
| -from _typeshed import ReadableBuffer, Self |
| 4 | +from _typeshed import ReadableBuffer, Self, _BufferWithLen |
5 | 5 | from builtins import list as _list # conflicts with a method named "list"
|
6 | 6 | from collections.abc import Callable
|
7 | 7 | from datetime import datetime
|
@@ -151,11 +151,11 @@ class IMAP4_stream(IMAP4):
|
151 | 151 | def open(self, host: str | None = ..., port: int | None = ...) -> None: ...
|
152 | 152 |
|
153 | 153 | class _Authenticator:
|
154 |
| - mech: Callable[[bytes], bytes] |
155 |
| - def __init__(self, mechinst: Callable[[bytes], bytes]) -> None: ... |
| 154 | + mech: Callable[[bytes], bytes | bytearray | memoryview | str | None] |
| 155 | + def __init__(self, mechinst: Callable[[bytes], bytes | bytearray | memoryview | str | None]) -> None: ... |
156 | 156 | def process(self, data: str) -> str: ...
|
157 |
| - def encode(self, inp: bytes) -> str: ... |
158 |
| - def decode(self, inp: str) -> bytes: ... |
| 157 | + def encode(self, inp: bytes | bytearray | memoryview) -> str: ... |
| 158 | + def decode(self, inp: str | _BufferWithLen) -> bytes: ... |
159 | 159 |
|
160 | 160 | def Internaldate2tuple(resp: ReadableBuffer) -> time.struct_time | None: ...
|
161 | 161 | def Int2AP(num: SupportsAbs[SupportsInt]) -> bytes: ...
|
|
0 commit comments