Third-party stubs: import from collections.abc where possible (#7637)

This commit is contained in:
Alex Waygood
2022-04-16 14:52:57 +01:00
committed by GitHub
parent ee09d9eb19
commit 653f2c6ba4
146 changed files with 268 additions and 156 deletions

View File

@@ -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

View File

@@ -1,4 +1,5 @@
from typing import Any, Iterable
from collections.abc import Iterable
from typing import Any
class BERException(Exception): ...

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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")

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -1,5 +1,5 @@
import socket
from typing import Mapping
from collections.abc import Mapping
from paramiko.pkey import PKey

View File

@@ -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

View File

@@ -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