stdlib: audit more callback annotations (#8209)

This commit is contained in:
Alex Waygood
2022-07-19 15:07:25 +01:00
committed by GitHub
parent 540a6b25bf
commit e2ce7c6344
21 changed files with 61 additions and 64 deletions

View File

@@ -90,22 +90,22 @@ class FTP:
def ntransfercmd(self, cmd: str, rest: int | str | None = ...) -> tuple[socket, int]: ...
def transfercmd(self, cmd: str, rest: int | str | None = ...) -> socket: ...
def retrbinary(
self, cmd: str, callback: Callable[[bytes], Any], blocksize: int = ..., rest: int | str | None = ...
self, cmd: str, callback: Callable[[bytes], object], blocksize: int = ..., rest: int | str | None = ...
) -> str: ...
def storbinary(
self,
cmd: str,
fp: SupportsRead[bytes],
blocksize: int = ...,
callback: Callable[[bytes], Any] | None = ...,
callback: Callable[[bytes], object] | None = ...,
rest: int | str | None = ...,
) -> str: ...
def retrlines(self, cmd: str, callback: Callable[[str], Any] | None = ...) -> str: ...
def storlines(self, cmd: str, fp: SupportsReadline[bytes], callback: Callable[[bytes], Any] | None = ...) -> str: ...
def retrlines(self, cmd: str, callback: Callable[[str], object] | None = ...) -> str: ...
def storlines(self, cmd: str, fp: SupportsReadline[bytes], callback: Callable[[bytes], object] | None = ...) -> str: ...
def acct(self, password: str) -> str: ...
def nlst(self, *args: str) -> list[str]: ...
# Technically only the last arg can be a Callable but ...
def dir(self, *args: str | Callable[[str], None]) -> None: ...
def dir(self, *args: str | Callable[[str], object]) -> None: ...
def mlsd(self, path: str = ..., facts: Iterable[str] = ...) -> Iterator[tuple[str, dict[str, str]]]: ...
def rename(self, fromname: str, toname: str) -> str: ...
def delete(self, filename: str) -> str: ...