mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-27 20:12:21 +08:00
Third-party stubs: audit more Callable[<parameters>, Any] annotations (#8233)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from collections.abc import Callable
|
||||
from typing import IO, Any
|
||||
from typing import IO
|
||||
|
||||
from paramiko.message import Message
|
||||
from paramiko.pkey import PKey
|
||||
@@ -31,4 +31,4 @@ class DSSKey(PKey):
|
||||
def write_private_key_file(self, filename: str, password: str | None = ...) -> None: ...
|
||||
def write_private_key(self, file_obj: IO[str], password: str | None = ...) -> None: ...
|
||||
@staticmethod
|
||||
def generate(bits: int = ..., progress_func: Callable[..., Any] | None = ...) -> DSSKey: ...
|
||||
def generate(bits: int = ..., progress_func: Callable[..., object] | None = ...) -> DSSKey: ...
|
||||
|
||||
@@ -50,5 +50,5 @@ class ECDSAKey(PKey):
|
||||
def write_private_key(self, file_obj: IO[str], password: str | None = ...) -> None: ...
|
||||
@classmethod
|
||||
def generate(
|
||||
cls, curve: EllipticCurve = ..., progress_func: Callable[..., Any] | None = ..., bits: int | None = ...
|
||||
cls, curve: EllipticCurve = ..., progress_func: Callable[..., object] | None = ..., bits: int | None = ...
|
||||
) -> ECDSAKey: ...
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from collections.abc import Callable
|
||||
from typing import IO, Any
|
||||
from typing import IO
|
||||
|
||||
from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateKey, RSAPublicKey, RSAPublicNumbers
|
||||
from paramiko.message import Message
|
||||
@@ -31,4 +31,4 @@ class RSAKey(PKey):
|
||||
def write_private_key_file(self, filename: str, password: str | None = ...) -> None: ...
|
||||
def write_private_key(self, file_obj: IO[str], password: str | None = ...) -> None: ...
|
||||
@staticmethod
|
||||
def generate(bits: int, progress_func: Callable[..., Any] | None = ...) -> RSAKey: ...
|
||||
def generate(bits: int, progress_func: Callable[..., object] | None = ...) -> RSAKey: ...
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from _typeshed import Self
|
||||
from collections.abc import Callable, Iterator
|
||||
from logging import Logger
|
||||
from typing import IO, Any
|
||||
from typing import IO
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from paramiko.channel import Channel
|
||||
@@ -11,7 +11,7 @@ from paramiko.sftp_file import SFTPFile
|
||||
from paramiko.transport import Transport
|
||||
from paramiko.util import ClosingContextManager
|
||||
|
||||
_Callback: TypeAlias = Callable[[int, int], Any]
|
||||
_Callback: TypeAlias = Callable[[int, int], object]
|
||||
|
||||
b_slash: bytes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user