Fix unsound return type hints in urllib module (#10470)

* Fix unsound return type hints in urllib module
Closes #10466

* Fix return type of ftplib.FTP.ntransfercmd
Related to #10466
This commit is contained in:
Jisuk Byun
2023-07-19 01:46:28 +09:00
committed by GitHub
parent 95b268999c
commit 60a95da159
2 changed files with 5 additions and 5 deletions

View File

@@ -87,7 +87,7 @@ class FTP:
def makepasv(self) -> tuple[str, int]: ...
def login(self, user: str = "", passwd: str = "", acct: str = "") -> str: ...
# 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: str, rest: int | str | None = None) -> tuple[socket, int]: ...
def ntransfercmd(self, cmd: str, rest: int | str | None = None) -> tuple[socket, int | None]: ...
def transfercmd(self, cmd: str, rest: int | str | None = None) -> socket: ...
def retrbinary(
self, cmd: str, callback: Callable[[bytes], object], blocksize: int = 8192, rest: int | str | None = None