mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Use lowercase tuple where possible (#6170)
This commit is contained in:
@@ -41,7 +41,7 @@ class FTP:
|
||||
def __exit__(
|
||||
self, exc_type: Type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
source_address: Tuple[str, int] | None
|
||||
source_address: tuple[str, int] | None
|
||||
if sys.version_info >= (3, 9):
|
||||
def __init__(
|
||||
self,
|
||||
@@ -50,7 +50,7 @@ class FTP:
|
||||
passwd: str = ...,
|
||||
acct: str = ...,
|
||||
timeout: float = ...,
|
||||
source_address: Tuple[str, int] | None = ...,
|
||||
source_address: tuple[str, int] | None = ...,
|
||||
*,
|
||||
encoding: str = ...,
|
||||
) -> None: ...
|
||||
@@ -62,10 +62,10 @@ class FTP:
|
||||
passwd: str = ...,
|
||||
acct: str = ...,
|
||||
timeout: float = ...,
|
||||
source_address: Tuple[str, int] | None = ...,
|
||||
source_address: tuple[str, int] | None = ...,
|
||||
) -> None: ...
|
||||
def connect(
|
||||
self, host: str = ..., port: int = ..., timeout: float = ..., source_address: Tuple[str, int] | None = ...
|
||||
self, host: str = ..., port: int = ..., timeout: float = ..., source_address: tuple[str, int] | None = ...
|
||||
) -> str: ...
|
||||
def getwelcome(self) -> str: ...
|
||||
def set_debuglevel(self, level: int) -> None: ...
|
||||
@@ -84,10 +84,10 @@ class FTP:
|
||||
def sendport(self, host: str, port: int) -> str: ...
|
||||
def sendeprt(self, host: str, port: int) -> str: ...
|
||||
def makeport(self) -> socket: ...
|
||||
def makepasv(self) -> Tuple[str, int]: ...
|
||||
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 = ...) -> Tuple[socket, int]: ...
|
||||
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 = ...
|
||||
@@ -106,7 +106,7 @@ class FTP:
|
||||
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 mlsd(self, path: str = ..., facts: Iterable[str] = ...) -> Iterator[Tuple[str, dict[str, str]]]: ...
|
||||
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: ...
|
||||
def cwd(self, dirname: str) -> str: ...
|
||||
@@ -129,7 +129,7 @@ class FTP_TLS(FTP):
|
||||
certfile: str | None = ...,
|
||||
context: SSLContext | None = ...,
|
||||
timeout: float = ...,
|
||||
source_address: Tuple[str, int] | None = ...,
|
||||
source_address: tuple[str, int] | None = ...,
|
||||
*,
|
||||
encoding: str = ...,
|
||||
) -> None: ...
|
||||
@@ -144,7 +144,7 @@ class FTP_TLS(FTP):
|
||||
certfile: str | None = ...,
|
||||
context: SSLContext | None = ...,
|
||||
timeout: float = ...,
|
||||
source_address: Tuple[str, int] | None = ...,
|
||||
source_address: tuple[str, int] | None = ...,
|
||||
) -> None: ...
|
||||
ssl_version: int
|
||||
keyfile: str | None
|
||||
@@ -157,8 +157,8 @@ class FTP_TLS(FTP):
|
||||
def ccc(self) -> str: ...
|
||||
|
||||
def parse150(resp: str) -> int | None: ... # undocumented
|
||||
def parse227(resp: str) -> Tuple[str, int]: ... # undocumented
|
||||
def parse229(resp: str, peer: Any) -> Tuple[str, int]: ... # undocumented
|
||||
def parse227(resp: str) -> tuple[str, int]: ... # undocumented
|
||||
def parse229(resp: str, peer: Any) -> tuple[str, int]: ... # undocumented
|
||||
def parse257(resp: str) -> str: ... # undocumented
|
||||
def ftpcp(
|
||||
source: FTP, sourcename: str, target: FTP, targetname: str = ..., type: Literal["A", "I"] = ...
|
||||
|
||||
Reference in New Issue
Block a user