diff --git a/stdlib/2and3/ftplib.pyi b/stdlib/2and3/ftplib.pyi index 308544dcc..128b91da9 100644 --- a/stdlib/2and3/ftplib.pyi +++ b/stdlib/2and3/ftplib.pyi @@ -1,6 +1,6 @@ # Stubs for ftplib (Python 2.7/3) import sys -from typing import Optional, BinaryIO, Tuple, TextIO, Iterable, Callable, List, Union, Iterator, Dict, Text, TypeVar, Generic +from typing import Optional, BinaryIO, Tuple, TextIO, Iterable, Callable, List, Union, Iterator, Dict, Text, TypeVar, Generic, Any from types import TracebackType from socket import socket from ssl import SSLContext @@ -82,11 +82,11 @@ class FTP: # In practice, `rest` rest can actually be anything whose str() is an integer sequence, so to make it simple we allow integers. def ntransfercmd(self, cmd: Text, rest: Optional[_IntOrStr] = ...) -> Tuple[socket, int]: ... def transfercmd(self, cmd: Text, rest: Optional[_IntOrStr] = ...) -> socket: ... - def retrbinary(self, cmd: Text, callback: Callable[[bytes], None], blocksize: int = ..., rest: Optional[_IntOrStr] = ...) -> str: ... - def storbinary(self, cmd: Text, fp: BinaryIO, blocksize: int = ..., callback: Optional[Callable[[bytes], None]] = ..., rest: Optional[_IntOrStr] = ...) -> str: ... + def retrbinary(self, cmd: Text, callback: Callable[[bytes], Any], blocksize: int = ..., rest: Optional[_IntOrStr] = ...) -> str: ... + def storbinary(self, cmd: Text, fp: BinaryIO, blocksize: int = ..., callback: Optional[Callable[[bytes], Any]] = ..., rest: Optional[_IntOrStr] = ...) -> str: ... - def retrlines(self, cmd: Text, callback: Optional[Callable[[str], None]] = ...) -> str: ... - def storlines(self, cmd: Text, fp: BinaryIO, callback: Optional[Callable[[bytes], None]] = ...) -> str: ... + def retrlines(self, cmd: Text, callback: Optional[Callable[[str], Any]] = ...) -> str: ... + def storlines(self, cmd: Text, fp: BinaryIO, callback: Optional[Callable[[bytes], Any]] = ...) -> str: ... def acct(self, password: Text) -> str: ... def nlst(self, *args: Text) -> List[str]: ...