diff --git a/stubs/paramiko/paramiko/channel.pyi b/stubs/paramiko/paramiko/channel.pyi index 9d91647f11d2..f88d5c753e3e 100644 --- a/stubs/paramiko/paramiko/channel.pyi +++ b/stubs/paramiko/paramiko/channel.pyi @@ -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: ... diff --git a/stubs/paramiko/paramiko/packet.pyi b/stubs/paramiko/paramiko/packet.pyi index b78fe53d7631..f7e62d8536a2 100644 --- a/stubs/paramiko/paramiko/packet.pyi +++ b/stubs/paramiko/paramiko/packet.pyi @@ -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: ... diff --git a/stubs/paramiko/paramiko/transport.pyi b/stubs/paramiko/paramiko/transport.pyi index a020a889f0bf..efaacd9e7f9e 100644 --- a/stubs/paramiko/paramiko/transport.pyi +++ b/stubs/paramiko/paramiko/transport.pyi @@ -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: ... diff --git a/stubs/pyOpenSSL/OpenSSL/SSL.pyi b/stubs/pyOpenSSL/OpenSSL/SSL.pyi index d1a2a404fc2c..d547e35b38f1 100644 --- a/stubs/pyOpenSSL/OpenSSL/SSL.pyi +++ b/stubs/pyOpenSSL/OpenSSL/SSL.pyi @@ -151,6 +151,6 @@ class Context: def use_privatekey(self, pkey: PKey) -> None: ... def add_extra_chain_cert(self, certobj: X509) -> None: ... def set_cipher_list(self, cipher_list: bytes) -> None: ... - def set_keylog_callback(self, callback: Callable[[Connection, bytes], None]) -> None: ... + def set_keylog_callback(self, callback: Callable[[Connection, bytes], object]) -> None: ... def set_alpn_protos(self, protos: Sequence[bytes]) -> None: ... def set_alpn_select_callback(self, callback: Callable[[Connection, list[bytes]], bytes]) -> None: ... diff --git a/stubs/pynput/pynput/_util.pyi b/stubs/pynput/pynput/_util.pyi index 4996c3b378d4..4202bcb5464e 100644 --- a/stubs/pynput/pynput/_util.pyi +++ b/stubs/pynput/pynput/_util.pyi @@ -67,6 +67,6 @@ class Events(Generic[_T, _AbstractListener_T]): def __iter__(self: Self) -> Self: ... def __next__(self) -> _T: ... def get(self, timeout: float | None = ...) -> _T | None: ... - def _event_mapper(self, event: Callable[_P, None]) -> Callable[_P, None]: ... + def _event_mapper(self, event: Callable[_P, object]) -> Callable[_P, None]: ... class NotifierMixin: ... diff --git a/stubs/pynput/pynput/keyboard/__init__.pyi b/stubs/pynput/pynput/keyboard/__init__.pyi index e470b5883909..7add8545394f 100644 --- a/stubs/pynput/pynput/keyboard/__init__.pyi +++ b/stubs/pynput/pynput/keyboard/__init__.pyi @@ -20,7 +20,7 @@ class Events(_util.Events[Any, Listener]): def get(self, timeout: float | None = ...) -> Press | Release | None: ... class HotKey: - def __init__(self, keys: list[KeyCode], on_activate: Callable[[], None]) -> None: ... + def __init__(self, keys: list[KeyCode], on_activate: Callable[[], object]) -> None: ... @staticmethod def parse(keys: str) -> list[KeyCode]: ... def press(self, key: Key | KeyCode) -> None: ... diff --git a/stubs/pysftp/pysftp/helpers.pyi b/stubs/pysftp/pysftp/helpers.pyi index d8278c029817..f792cd3e13c1 100644 --- a/stubs/pysftp/pysftp/helpers.pyi +++ b/stubs/pysftp/pysftp/helpers.pyi @@ -27,7 +27,7 @@ def path_advance(thepath: str, sep: str = ...) -> Iterator[str]: ... def path_retreat(thepath: str, sep: str = ...) -> Iterator[str]: ... def reparent(newparent: str, oldpath: str) -> str: ... -_PathCallback: TypeAlias = Callable[[str], None] +_PathCallback: TypeAlias = Callable[[str], object] def walktree( localpath: str, fcallback: _PathCallback, dcallback: _PathCallback, ucallback: _PathCallback, recurse: bool = ... diff --git a/stubs/setuptools/pkg_resources/__init__.pyi b/stubs/setuptools/pkg_resources/__init__.pyi index 726750a8cb3a..3c44c5836f10 100644 --- a/stubs/setuptools/pkg_resources/__init__.pyi +++ b/stubs/setuptools/pkg_resources/__init__.pyi @@ -36,7 +36,7 @@ class WorkingSet: self, requirements: Iterable[Requirement], env: Environment | None = ..., installer: _InstallerType | None = ... ) -> list[Distribution]: ... def add(self, dist: Distribution, entry: str | None = ..., insert: bool = ..., replace: bool = ...) -> None: ... - def subscribe(self, callback: Callable[[Distribution], None]) -> None: ... + def subscribe(self, callback: Callable[[Distribution], object]) -> None: ... def find_plugins( self, plugin_env: Environment, full_env: Environment | None = ..., fallback: bool = ... ) -> tuple[list[Distribution], dict[Distribution, Exception]]: ... diff --git a/stubs/waitress/waitress/trigger.pyi b/stubs/waitress/waitress/trigger.pyi index 58cf30f23b04..0908963bab23 100644 --- a/stubs/waitress/waitress/trigger.pyi +++ b/stubs/waitress/waitress/trigger.pyi @@ -16,7 +16,7 @@ class _triggerbase: def handle_connect(self) -> None: ... def handle_close(self) -> None: ... def close(self) -> None: ... - def pull_trigger(self, thunk: Callable[[None], None] | None = ...) -> None: ... + def pull_trigger(self, thunk: Callable[[None], object] | None = ...) -> None: ... def handle_read(self) -> None: ... if sys.platform == "linux" or sys.platform == "darwin": diff --git a/stubs/waitress/waitress/utilities.pyi b/stubs/waitress/waitress/utilities.pyi index bb43fa5d2178..caffa026a008 100644 --- a/stubs/waitress/waitress/utilities.pyi +++ b/stubs/waitress/waitress/utilities.pyi @@ -1,4 +1,5 @@ -from collections.abc import Callable, Mapping, Sequence +from _typeshed.wsgi import StartResponse +from collections.abc import Iterator, Mapping, Sequence from logging import Logger from typing import Any, Match, Pattern @@ -43,7 +44,7 @@ class Error: body: str = ... def __init__(self, body: str) -> None: ... def to_response(self) -> tuple[str, Sequence[tuple[str, str]], str]: ... - def wsgi_response(self, environ: Any, start_response: Callable[[str, Sequence[tuple[str, str]]], None]) -> str: ... + def wsgi_response(self, environ: Any, start_response: StartResponse) -> Iterator[str]: ... class BadRequest(Error): code: int = ...