mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-24 18:48:46 +08:00
Third-party stubs: import from collections.abc where possible (#7637)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from collections.abc import Callable
|
||||
from threading import Event
|
||||
from typing import Callable
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from paramiko.pkey import PKey
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any, Iterable
|
||||
from collections.abc import Iterable
|
||||
from typing import Any
|
||||
|
||||
class BERException(Exception): ...
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from collections.abc import Callable, Mapping
|
||||
from logging import Logger
|
||||
from threading import Condition, Event, Lock
|
||||
from typing import Any, Callable, Mapping, TypeVar
|
||||
from typing import Any, TypeVar
|
||||
|
||||
from paramiko.buffered_pipe import BufferedPipe
|
||||
from paramiko.file import BufferedFile
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Iterable, Mapping, NoReturn
|
||||
from collections.abc import Iterable, Mapping
|
||||
from typing import NoReturn
|
||||
|
||||
from paramiko.channel import Channel, ChannelFile, ChannelStderrFile, ChannelStdinFile
|
||||
from paramiko.hostkeys import HostKeys
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from _typeshed import Self
|
||||
from typing import IO, Any, Iterable, Pattern
|
||||
from collections.abc import Iterable
|
||||
from typing import IO, Any, Pattern
|
||||
|
||||
from paramiko.ssh_exception import ConfigParseError as ConfigParseError, CouldNotCanonicalize as CouldNotCanonicalize
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import IO, Any, Callable
|
||||
from collections.abc import Callable
|
||||
from typing import IO, Any
|
||||
|
||||
from paramiko.message import Message
|
||||
from paramiko.pkey import PKey
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import IO, Any, Callable, Sequence
|
||||
from collections.abc import Callable, Sequence
|
||||
from typing import IO, Any
|
||||
|
||||
from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurve, EllipticCurvePrivateKey, EllipticCurvePublicKey
|
||||
from cryptography.hazmat.primitives.hashes import HashAlgorithm
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any, AnyStr, Generic, Iterable
|
||||
from collections.abc import Iterable
|
||||
from typing import Any, AnyStr, Generic
|
||||
|
||||
from paramiko.util import ClosingContextManager
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from _typeshed import Self
|
||||
from typing import Iterator, Mapping, MutableMapping
|
||||
from collections.abc import Iterator, Mapping, MutableMapping
|
||||
|
||||
from paramiko.pkey import PKey
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import sys
|
||||
from _typeshed import ReadableBuffer as ReadableBuffer
|
||||
from typing import Callable
|
||||
from collections.abc import Callable
|
||||
|
||||
from cryptography.hazmat.primitives.asymmetric.x25519 import X25519PrivateKey
|
||||
from paramiko.message import Message
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import sys
|
||||
from _typeshed import ReadableBuffer
|
||||
from typing import Callable
|
||||
from collections.abc import Callable
|
||||
|
||||
from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurve, EllipticCurvePrivateKey, EllipticCurvePublicKey
|
||||
from paramiko.message import Message
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import sys
|
||||
from _typeshed import ReadableBuffer
|
||||
from typing import Callable
|
||||
from collections.abc import Callable
|
||||
|
||||
from paramiko.message import Message
|
||||
from paramiko.transport import Transport
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import sys
|
||||
from _typeshed import ReadableBuffer
|
||||
from typing import Callable
|
||||
from collections.abc import Callable
|
||||
|
||||
from paramiko.message import Message
|
||||
from paramiko.transport import Transport
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import sys
|
||||
from _typeshed import ReadableBuffer
|
||||
from typing import Callable
|
||||
from collections.abc import Callable
|
||||
|
||||
from paramiko.kex_group1 import KexGroup1 as KexGroup1
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import sys
|
||||
from _typeshed import ReadableBuffer
|
||||
from typing import Callable
|
||||
from collections.abc import Callable
|
||||
|
||||
from paramiko.kex_group1 import KexGroup1 as KexGroup1
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import sys
|
||||
from typing import Any, Iterable
|
||||
from collections.abc import Iterable
|
||||
from typing import Any
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from .common import _LikeBytes
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import sys
|
||||
from collections.abc import Callable
|
||||
from logging import Logger
|
||||
from socket import socket
|
||||
from typing import Any, Callable
|
||||
from typing import Any
|
||||
|
||||
from cryptography.hazmat.primitives.ciphers import Cipher
|
||||
from paramiko.compress import ZlibCompressor, ZlibDecompressor
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import sys
|
||||
from typing import Any, Iterable, Sequence, TypeVar
|
||||
from collections.abc import Iterable, Sequence
|
||||
from typing import Any, TypeVar
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import IO, Any, Callable
|
||||
from collections.abc import Callable
|
||||
from typing import IO, Any
|
||||
|
||||
from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateKey, RSAPublicKey, RSAPublicNumbers
|
||||
from paramiko.message import Message
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from _typeshed import Self
|
||||
from collections.abc import Callable, Iterator
|
||||
from logging import Logger
|
||||
from typing import IO, Any, Callable, Iterator
|
||||
from typing import IO, Any
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from paramiko.channel import Channel
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any, Iterator, Sequence
|
||||
from collections.abc import Iterator, Sequence
|
||||
from typing import Any
|
||||
|
||||
from paramiko.file import BufferedFile
|
||||
from paramiko.sftp_attr import SFTPAttributes
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import socket
|
||||
from typing import Mapping
|
||||
from collections.abc import Mapping
|
||||
|
||||
from paramiko.pkey import PKey
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
from collections.abc import Callable, Iterable, Sequence
|
||||
from logging import Logger
|
||||
from socket import socket
|
||||
from threading import Condition, Event, Lock, Thread
|
||||
from types import ModuleType
|
||||
from typing import Any, Callable, Iterable, Protocol, Sequence
|
||||
from typing import Any, Protocol
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from paramiko.auth_handler import AuthHandler, _InteractiveCallback
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import sys
|
||||
from _typeshed import Self
|
||||
from collections.abc import Callable
|
||||
from logging import Logger, LogRecord
|
||||
from types import TracebackType
|
||||
from typing import IO, AnyStr, Callable, Protocol, TypeVar
|
||||
from typing import IO, AnyStr, Protocol, TypeVar
|
||||
|
||||
from paramiko.config import SSHConfig, SSHConfigDict
|
||||
from paramiko.hostkeys import HostKeys
|
||||
|
||||
Reference in New Issue
Block a user