diff --git a/stdlib/2and3/poplib.pyi b/stdlib/2and3/poplib.pyi index ab8d4fcb4e15..36f6e1d3a060 100644 --- a/stdlib/2and3/poplib.pyi +++ b/stdlib/2and3/poplib.pyi @@ -6,6 +6,8 @@ import ssl import sys from typing import Any, BinaryIO, Dict, List, Optional, Pattern, Text, Tuple +_LongResp = Tuple[bytes, List[bytes], int] + class error_proto(Exception): pass POP3_PORT: int @@ -31,9 +33,9 @@ class POP3: def user(self, user: Text) -> bytes: ... def pass_(self, pswd: Text) -> bytes: ... def stat(self) -> Tuple[int, int]: ... - def list(self, which: Optional[Text] = ...) -> bytes: ... - def retr(self, which: Text) -> bytes: ... - def dele(self, which: Text) -> bytes: ... + def list(self, which: Optional[Any] = ...) -> _LongResp: ... + def retr(self, which: Any) -> _LongResp: ... + def dele(self, which: Any) -> bytes: ... def noop(self) -> bytes: ... def rset(self) -> bytes: ... def quit(self) -> bytes: ... @@ -46,8 +48,8 @@ class POP3: def apop(self, user: Text, secret: Text) -> bytes: ... else: def apop(self, user: Text, password: Text) -> bytes: ... - def top(self, which: Text, howmuch: int) -> bytes: ... - def uidl(self, which: Optional[Text] = ...) -> bytes: ... + def top(self, which: Any, howmuch: int) -> _LongResp: ... + def uidl(self, which: Optional[Any] = ...) -> _LongResp: ... if sys.version_info >= (3, 5): def utf8(self) -> bytes: ... if sys.version_info >= (3, 4):