Skip to content

Commit 7be1a6f

Browse files
JelleZijlstragvanrossum
authored andcommitted
fix some types in poplib (#1225)
Fixes a problem introduced in #1211.
1 parent ee0f341 commit 7be1a6f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

stdlib/2and3/poplib.pyi

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import ssl
66
import sys
77
from typing import Any, BinaryIO, Dict, List, Optional, Pattern, Text, Tuple
88

9+
_LongResp = Tuple[bytes, List[bytes], int]
10+
911
class error_proto(Exception): pass
1012

1113
POP3_PORT: int
@@ -31,9 +33,9 @@ class POP3:
3133
def user(self, user: Text) -> bytes: ...
3234
def pass_(self, pswd: Text) -> bytes: ...
3335
def stat(self) -> Tuple[int, int]: ...
34-
def list(self, which: Optional[Text] = ...) -> bytes: ...
35-
def retr(self, which: Text) -> bytes: ...
36-
def dele(self, which: Text) -> bytes: ...
36+
def list(self, which: Optional[Any] = ...) -> _LongResp: ...
37+
def retr(self, which: Any) -> _LongResp: ...
38+
def dele(self, which: Any) -> bytes: ...
3739
def noop(self) -> bytes: ...
3840
def rset(self) -> bytes: ...
3941
def quit(self) -> bytes: ...
@@ -46,8 +48,8 @@ class POP3:
4648
def apop(self, user: Text, secret: Text) -> bytes: ...
4749
else:
4850
def apop(self, user: Text, password: Text) -> bytes: ...
49-
def top(self, which: Text, howmuch: int) -> bytes: ...
50-
def uidl(self, which: Optional[Text] = ...) -> bytes: ...
51+
def top(self, which: Any, howmuch: int) -> _LongResp: ...
52+
def uidl(self, which: Optional[Any] = ...) -> _LongResp: ...
5153
if sys.version_info >= (3, 5):
5254
def utf8(self) -> bytes: ...
5355
if sys.version_info >= (3, 4):

0 commit comments

Comments
 (0)