Third-party stubs: audit Callable[<parameters>, None] annotations (#8175)

This commit is contained in:
Alex Waygood
2022-06-26 12:56:19 +01:00
committed by GitHub
parent 49cdaa41db
commit 74bd0d962b
10 changed files with 13 additions and 12 deletions

View File

@@ -60,9 +60,9 @@ class Channel(ClosingContextManager):
auth_protocol: str | bytes | None = ...,
auth_cookie: str | bytes | None = ...,
single_connection: bool = ...,
handler: Callable[[Channel, tuple[str, int]], None] | None = ...,
handler: Callable[[Channel, tuple[str, int]], object] | None = ...,
) -> bytes: ...
def request_forward_agent(self, handler: Callable[[Channel], None]) -> bool: ...
def request_forward_agent(self, handler: Callable[[Channel], object]) -> bool: ...
def get_transport(self) -> Transport: ...
def set_name(self, name: str) -> None: ...
def get_name(self) -> str: ...

View File

@@ -44,7 +44,7 @@ class Packetizer:
def get_mac_size_in(self) -> int: ...
def get_mac_size_out(self) -> int: ...
def need_rekey(self) -> bool: ...
def set_keepalive(self, interval: int, callback: Callable[[], None]) -> None: ...
def set_keepalive(self, interval: int, callback: Callable[[], object]) -> None: ...
def read_timer(self) -> None: ...
def start_handshake(self, timeout: float) -> None: ...
def handshake_timed_out(self) -> bool: ...

View File

@@ -120,7 +120,7 @@ class Transport(Thread, ClosingContextManager):
timeout: float | None = ...,
) -> Channel: ...
def request_port_forward(
self, address: str, port: int, handler: Callable[[Channel, _Addr, _Addr], None] | None = ...
self, address: str, port: int, handler: Callable[[Channel, _Addr, _Addr], object] | None = ...
) -> int: ...
def cancel_port_forward(self, address: str, port: int) -> None: ...
def open_sftp_client(self) -> SFTPClient | None: ...