From 7be1a6f1fd87cd3f17cb8beebe0e1a75278ff803 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sun, 30 Apr 2017 08:56:42 -0700 Subject: [PATCH] fix some types in poplib (#1225) Fixes a problem introduced in #1211. --- stdlib/2and3/poplib.pyi | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/stdlib/2and3/poplib.pyi b/stdlib/2and3/poplib.pyi index ab8d4fcb4..36f6e1d3a 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):