From b0295a3ba03cbc0fbd95e1847e6db45f8c123fcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 11 Jun 2023 09:27:22 +0300 Subject: [PATCH] Spelling and grammar fixes --- asyncssh/channel.py | 8 ++++---- asyncssh/client.py | 2 +- asyncssh/connection.py | 28 ++++++++++++++-------------- asyncssh/editor.py | 2 +- asyncssh/encryption.py | 6 +++--- asyncssh/pkcs11.py | 2 +- asyncssh/public_key.py | 10 +++++----- asyncssh/server.py | 10 +++++----- asyncssh/session.py | 2 +- asyncssh/sftp.py | 18 +++++++++--------- asyncssh/subprocess.py | 2 +- docs/api.rst | 8 ++++---- docs/changes.rst | 12 ++++++------ docs/index.rst | 6 +++--- tests/test_connection.py | 10 +++++----- tests/test_connection_auth.py | 2 +- tests/test_known_hosts.py | 4 ++-- tests/test_public_key.py | 4 ++-- 18 files changed, 68 insertions(+), 68 deletions(-) diff --git a/asyncssh/channel.py b/asyncssh/channel.py index 7f945c96..7744c061 100644 --- a/asyncssh/channel.py +++ b/asyncssh/channel.py @@ -1007,7 +1007,7 @@ def resume_reading(self) -> None: This method can be called to resume delivery of incoming data which was suspended by a call to :meth:`pause_reading`. As soon as this method is called, any buffered data will be delivered - immediately. A pending end-of-file notication may also be + immediately. A pending end-of-file notification may also be delivered if one was queued while reading was paused. """ @@ -1042,7 +1042,7 @@ def get_command(self) -> Optional[str]: This method returns the command the client requested to execute when the session was opened, if any. If the client did not request that a command be executed, this method - will return `None`. On the server, alls to this method + will return `None`. On the server, calls to this method should only be made after :meth:`session_started ` has been called on the :class:`SSHServerSession`. When using the stream-based API, @@ -1829,7 +1829,7 @@ def get_x11_display(self) -> Optional[str]: forwarding, this method returns `None`. :returns: A `str` containing the X11 display or `None` if - X11 fowarding was not requested + X11 forwarding was not requested """ @@ -1845,7 +1845,7 @@ def get_agent_path(self) -> Optional[str]: `None`. :returns: A `str` containing the ssh-agent socket path or - `None` if agent fowarding was not requested + `None` if agent forwarding was not requested """ diff --git a/asyncssh/client.py b/asyncssh/client.py index 3150283e..83f229df 100644 --- a/asyncssh/client.py +++ b/asyncssh/client.py @@ -216,7 +216,7 @@ def auth_completed(self) -> None: """Authentication was completed successfully This method is called when authentication has completed - succesfully. Applications may use this method to create + successfully. Applications may use this method to create whatever client sessions and direct TCP/IP or UNIX domain connections are needed and/or set up listeners for incoming TCP/IP or UNIX domain connections coming from the server. diff --git a/asyncssh/connection.py b/asyncssh/connection.py index 9d218277..0d275620 100644 --- a/asyncssh/connection.py +++ b/asyncssh/connection.py @@ -664,7 +664,7 @@ class SSHAcceptor: This class in a wrapper around an :class:`asyncio.Server` listener which provides the ability to update the the set of SSH client or - server connection options associated wtih that listener. This is + server connection options associated with that listener. This is accomplished by calling the :meth:`update` method, which takes the same keyword arguments as the :class:`SSHClientConnectionOptions` and :class:`SSHServerConnectionOptions` classes. @@ -2545,7 +2545,7 @@ def abort(self) -> None: """Forcibly close the SSH connection This method closes the SSH connection immediately, without - waiting for pending operations to complete and wihtout sending + waiting for pending operations to complete and without sending an explicit SSH disconnect message. Buffered data waiting to be sent will be lost and no more data will be received. When the the connection is closed, :meth:`connection_lost() @@ -6728,7 +6728,7 @@ class SSHClientConnectionOptions(SSHConnectionOptions): :param password_auth: (optional) Whether or not to allow password authentication. By default, password authentication is enabled if a password is specified - or if callbacks to provide a password are made availble. + or if callbacks to provide a password are made available. :param gss_host: (optional) The principal name to use for the host in GSS key exchange and authentication. If not specified, this value will be the same @@ -6918,7 +6918,7 @@ class SSHClientConnectionOptions(SSHConnectionOptions): :param config: (optional) Paths to OpenSSH client configuration files to load. This configuration will be used as a fallback to override the - defaults for settings which are not explcitly specified using + defaults for settings which are not explicitly specified using AsyncSSH's configuration options. .. note:: Specifying configuration files when creating an @@ -7377,7 +7377,7 @@ class SSHServerConnectionOptions(SSHConnectionOptions): client connected from. :param authorized_client_keys: (optional) A list of authorized user and CA public keys which should be - trusted for certifcate-based client public key authentication. + trusted for certificate-based client public key authentication. :param x509_trusted_certs: (optional) A list of certificates which should be trusted for X.509 client certificate authentication. If this argument is explicitly set @@ -7567,7 +7567,7 @@ class SSHServerConnectionOptions(SSHConnectionOptions): :param config: (optional) Paths to OpenSSH server configuration files to load. This configuration will be used as a fallback to override the - defaults for settings which are not explcitly specified using + defaults for settings which are not explicitly specified using AsyncSSH's configuration options. .. note:: Specifying configuration files when creating an @@ -7855,7 +7855,7 @@ async def run_client(sock: socket.socket, config: DefTuple[ConfigPaths] = (), :param config: (optional) Paths to OpenSSH client configuration files to load. This configuration will be used as a fallback to override the - defaults for settings which are not explcitly specified using + defaults for settings which are not explicitly specified using AsyncSSH's configuration options. If no paths are specified and no config paths were set when constructing the `options` argument (if any), an attempt will be made to load the @@ -7909,7 +7909,7 @@ async def run_server(sock: socket.socket, config: DefTuple[ConfigPaths] = (), :param config: (optional) Paths to OpenSSH server configuration files to load. This configuration will be used as a fallback to override the - defaults for settings which are not explcitly specified using + defaults for settings which are not explicitly specified using AsyncSSH's configuration options. By default, no OpenSSH configuration files will be loaded. See :ref:`SupportedServerConfigOptions` for details on what @@ -8015,7 +8015,7 @@ async def connect(host = '', port: DefTuple[int] = (), *, :param config: (optional) Paths to OpenSSH client configuration files to load. This configuration will be used as a fallback to override the - defaults for settings which are not explcitly specified using + defaults for settings which are not explicitly specified using AsyncSSH's configuration options. If no paths are specified and no config paths were set when constructing the `options` argument (if any), an attempt will be made to load the @@ -8121,7 +8121,7 @@ async def connect_reverse( :param config: (optional) Paths to OpenSSH server configuration files to load. This configuration will be used as a fallback to override the - defaults for settings which are not explcitly specified using + defaults for settings which are not explicitly specified using AsyncSSH's configuration options. By default, no OpenSSH configuration files will be loaded. See :ref:`SupportedServerConfigOptions` for details on what @@ -8238,7 +8238,7 @@ async def listen(host = '', port: DefTuple[int] = (), *, :param config: (optional) Paths to OpenSSH server configuration files to load. This configuration will be used as a fallback to override the - defaults for settings which are not explcitly specified using + defaults for settings which are not explicitly specified using AsyncSSH's configuration options. By default, no OpenSSH configuration files will be loaded. See :ref:`SupportedServerConfigOptions` for details on what @@ -8371,7 +8371,7 @@ async def listen_reverse(host = '', port: DefTuple[int] = (), *, :param config: (optional) Paths to OpenSSH client configuration files to load. This configuration will be used as a fallback to override the - defaults for settings which are not explcitly specified using + defaults for settings which are not explicitly specified using AsyncSSH's configuration options. If no paths are specified and no config paths were set when constructing the `options` argument (if any), an attempt will be made to load the @@ -8549,7 +8549,7 @@ async def get_server_host_key( :param config: (optional) Paths to OpenSSH client configuration files to load. This configuration will be used as a fallback to override the - defaults for settings which are not explcitly specified using + defaults for settings which are not explicitly specified using AsyncSSH's configuration options. If no paths are specified and no config paths were set when constructing the `options` argument (if any), an attempt will be made to load the @@ -8691,7 +8691,7 @@ async def get_server_auth_methods( :param config: (optional) Paths to OpenSSH client configuration files to load. This configuration will be used as a fallback to override the - defaults for settings which are not explcitly specified using + defaults for settings which are not explicitly specified using AsyncSSH's configuration options. If no paths are specified and no config paths were set when constructing the `options` argument (if any), an attempt will be made to load the diff --git a/asyncssh/editor.py b/asyncssh/editor.py index f5b335fa..d2c9ff92 100644 --- a/asyncssh/editor.py +++ b/asyncssh/editor.py @@ -745,7 +745,7 @@ class SSHLineEditorChannel: this class is wrapped around the channel, providing the caller with the ability to enable and disable input line editing and echoing. - .. note:: Line editing is only available when a psuedo-terminal + .. note:: Line editing is only available when a pseudo-terminal is requested on the server channel and the character encoding on the channel is not set to `None`. diff --git a/asyncssh/encryption.py b/asyncssh/encryption.py index 02b0497f..feb98406 100644 --- a/asyncssh/encryption.py +++ b/asyncssh/encryption.py @@ -48,7 +48,7 @@ def new(cls, cipher_name: str, key: bytes, iv: bytes, mac_alg: bytes = b'', @classmethod def get_mac_params(cls, mac_alg: bytes) -> Tuple[int, int, bool]: - """Get paramaters of the MAC algorithm used with this encryption""" + """Get parameters of the MAC algorithm used with this encryption""" return get_mac_params(mac_alg) @@ -163,7 +163,7 @@ def new(cls, cipher_name: str, key: bytes, iv: bytes, mac_alg: bytes = b'', @classmethod def get_mac_params(cls, mac_alg: bytes) -> Tuple[int, int, bool]: - """Get paramaters of the MAC algorithm used with this encryption""" + """Get parameters of the MAC algorithm used with this encryption""" return 0, 16, True @@ -202,7 +202,7 @@ def new(cls, cipher_name: str, key: bytes, iv: bytes, mac_alg: bytes = b'', @classmethod def get_mac_params(cls, mac_alg: bytes) -> Tuple[int, int, bool]: - """Get paramaters of the MAC algorithm used with this encryption""" + """Get parameters of the MAC algorithm used with this encryption""" return 0, 16, True diff --git a/asyncssh/pkcs11.py b/asyncssh/pkcs11.py index d907b497..b9a47403 100644 --- a/asyncssh/pkcs11.py +++ b/asyncssh/pkcs11.py @@ -100,7 +100,7 @@ def sign(self, data: bytes) -> bytes: class SSHPKCS11Session: - """Work around PKCS#11 sesssions not supporting simultaneous opens""" + """Work around PKCS#11 sessions not supporting simultaneous opens""" _sessions: _SessionMap = {} diff --git a/asyncssh/public_key.py b/asyncssh/public_key.py index a590c2ba..224087b5 100644 --- a/asyncssh/public_key.py +++ b/asyncssh/public_key.py @@ -650,7 +650,7 @@ def generate_user_certificate( comment: DefTuple[_Comment] = ()) -> 'SSHOpenSSHCertificate': """Generate a new SSH user certificate - This method returns an SSH user certifcate with the requested + This method returns an SSH user certificate with the requested attributes signed by this private key. :param user_key: @@ -769,7 +769,7 @@ def generate_host_certificate(self, host_key: 'SSHKey', key_id: str, 'SSHOpenSSHCertificate': """Generate a new SSH host certificate - This method returns an SSH host certifcate with the requested + This method returns an SSH host certificate with the requested attributes signed by this private key. :param host_key: @@ -830,7 +830,7 @@ def generate_x509_user_certificate( comment: DefTuple[_Comment] = ()) -> 'SSHX509Certificate': """Generate a new X.509 user certificate - This method returns an X.509 user certifcate with the requested + This method returns an X.509 user certificate with the requested attributes signed by this private key. :param user_key: @@ -901,7 +901,7 @@ def generate_x509_host_certificate( comment: DefTuple[_Comment] = ()) -> 'SSHX509Certificate': """Generate a new X.509 host certificate - This method returns a X.509 host certifcate with the requested + This method returns an X.509 host certificate with the requested attributes signed by this private key. :param host_key: @@ -972,7 +972,7 @@ def generate_x509_ca_certificate(self, ca_key: 'SSHKey', subject: str, 'SSHX509Certificate': """Generate a new X.509 CA certificate - This method returns a X.509 CA certifcate with the requested + This method returns an X.509 CA certificate with the requested attributes signed by this private key. :param ca_key: diff --git a/asyncssh/server.py b/asyncssh/server.py index db533b6f..2c17647b 100644 --- a/asyncssh/server.py +++ b/asyncssh/server.py @@ -148,7 +148,7 @@ def auth_completed(self) -> None: """Authentication was completed successfully This method is called when authentication has completed - succesfully. Applications may use this method to perform + successfully. Applications may use this method to perform processing based on the authenticated username or options in the authorized keys list or certificate associated with the user before any sessions are opened or forwarding requests @@ -575,7 +575,7 @@ def kbdint_auth_supported(self) -> bool: authentication is supported. Applications wishing to support it must have this method return `True` and implement :meth:`get_kbdint_challenge` and :meth:`validate_kbdint_response` - to generate the apporiate challenges and validate the responses + to generate the appropriate challenges and validate the responses for the user being authenticated. By default, this method returns `NotImplemented` tying @@ -677,7 +677,7 @@ def session_requested(self) -> MaybeAwait[_NewSession]: If blocking operations need to be performed before the session can be created, a coroutine which returns an :class:`SSHServerSession` object can be returned instead of - the session iself. This can be either returned directly or as + the session itself. This can be either returned directly or as a part of a tuple with an :class:`SSHServerChannel` object. To reject this request, this method should return `False` @@ -742,7 +742,7 @@ def connection_requested(self, dest_host: str, dest_port: int, If blocking operations need to be performed before the session can be created, a coroutine which returns an :class:`SSHTCPSession` object can be returned instead of - the session iself. This can be either returned directly or as + the session itself. This can be either returned directly or as a part of a tuple with an :class:`SSHTCPChannel` object. By default, all connection requests are rejected. @@ -857,7 +857,7 @@ def unix_connection_requested(self, dest_path: str) -> _NewUNIXSession: If blocking operations need to be performed before the session can be created, a coroutine which returns an :class:`SSHUNIXSession` object can be returned instead of - the session iself. This can be either returned directly or as + the session itself. This can be either returned directly or as a part of a tuple with an :class:`SSHUNIXChannel` object. By default, all connection requests are rejected. diff --git a/asyncssh/session.py b/asyncssh/session.py index 57d2b022..291c5118 100644 --- a/asyncssh/session.py +++ b/asyncssh/session.py @@ -262,7 +262,7 @@ def connection_made(self, chan: 'SSHServerChannel[AnyStr]') -> None: def pty_requested(self, term_type: str, term_size: Tuple[int, int, int, int], term_modes: Mapping[int, int]) -> bool: - """A psuedo-terminal has been requested + """A pseudo-terminal has been requested This method is called when the client sends a request to allocate a pseudo-terminal with the requested terminal type, size, and diff --git a/asyncssh/sftp.py b/asyncssh/sftp.py index bb1aea82..96f1e6ae 100644 --- a/asyncssh/sftp.py +++ b/asyncssh/sftp.py @@ -601,7 +601,7 @@ def _setstat(path: Union[int, _SFTPPath], attrs: 'SFTPAttrs') -> None: class _SFTPParallelIO(Generic[_T]): """Parallelize I/O requests on files - This class issues parallel read and wite requests on files. + This class issues parallel read and write requests on files. """ @@ -1313,11 +1313,11 @@ def __init__(self, reason: str, lang: str = DEFAULT_LANG): class SFTPInvalidParameter(SFTPError): """SFTP invalid parameter (SFTPv6+) - This exception is raised when paramters in a request are + This exception is raised when parameters in a request are out of range or incompatible with one another. :param reason: - Details about the invalid paramter + Details about the invalid parameter :param lang: (optional) The language the reason is in :type reason: `str` @@ -3059,7 +3059,7 @@ async def read(self, size: int = -1, if offset is None: offset = self._offset - # If self._offset is None, we're appending and haven't seeked + # If self._offset is None, we're appending and haven't sought # backward in the file since the last write, so there's no # data to return @@ -3132,7 +3132,7 @@ async def read_parallel(self, size: int = -1, if offset is None: offset = self._offset - # If self._offset is None, we're appending and haven't seeked + # If self._offset is None, we're appending and haven't sought # backward in the file since the last write, so there's no # data to return @@ -4379,7 +4379,7 @@ async def open(self, path: _SFTPPath, Most applications should be able to use this method regardless of the version of the SFTP protocol negotiated with the SFTP server. A conversion from the pflags_or_mode values to the - SFTPv5/v6 flag values will happen automaitcally. However, if + SFTPv5/v6 flag values will happen automatically. However, if an application wishes to set flags only available in SFTPv5/v6, the :meth:`open56` method may be used to specify these flags explicitly. @@ -4973,7 +4973,7 @@ async def rename(self, oldpath: _SFTPPath, newpath: _SFTPPath, .. note:: By default, this version of rename will not overwrite the new path if it already exists. However, this can be controlled using the `flags` argument, - available in SFTPv5 and later. Whan a connection + available in SFTPv5 and later. When a connection is negotiated to use an earliler version of SFTP and `flags` is set, this method will attempt to fall back to the OpenSSH "posix-rename" extension @@ -5392,7 +5392,7 @@ class SFTPServerHandler(SFTPHandler): # Supported SFTPv5/v6 open flags _supported_open_flags = FXF_ACCESS_DISPOSITION | FXF_APPEND_DATA - # Supported SFTPv5/v6 desired accesss flags + # Supported SFTPv5/v6 desired access flags _supported_access_mask = ACE4_READ_DATA | ACE4_WRITE_DATA | \ ACE4_APPEND_DATA | ACE4_READ_ATTRIBUTES | \ ACE4_WRITE_ATTRIBUTES @@ -6373,7 +6373,7 @@ class SFTPServer: .. note:: Any method can optionally be defined as a coroutine if that method needs to perform - blocking opertions to determine its result. + blocking operations to determine its result. The `chan` object provided here is the :class:`SSHServerChannel` instance this SFTP server is associated with. It can be queried to diff --git a/asyncssh/subprocess.py b/asyncssh/subprocess.py index f1a9816b..3b1c30fb 100644 --- a/asyncssh/subprocess.py +++ b/asyncssh/subprocess.py @@ -134,7 +134,7 @@ def connection_made(self, transport: 'SSHSubprocessTransport[AnyStr]') -> None: """Called when a remote process is successfully started - This method is called when a a remote process is successfully + This method is called when a remote process is successfully started. The transport parameter should be stored if needed for later use. diff --git a/docs/api.rst b/docs/api.rst index 7630081e..348d0099 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -1357,7 +1357,7 @@ which is trusted by the remote system. Instead of passing tuples of keys and certificates or relying on file naming conventions for certificates, you also have the option of -providing a list of keys and a seperate list of certificates. In this +providing a list of keys and a separate list of certificates. In this case, AsyncSSH will automatically match up the keys with their associated certificates when they are present. @@ -1413,7 +1413,7 @@ with PKIX-SSH, which adds X.509 certificate support to OpenSSH. To specify a subject name pattern instead of a specific certificate, base64-encoded certificate data should be replaced with the string -'Subject:' followed by a a comma-separated list of X.509 relative +'Subject:' followed by a comma-separated list of X.509 relative distinguished name components. AsyncSSH extends the PKIX-SSH syntax to also support matching on a @@ -2184,9 +2184,9 @@ ConfigParseError Supported Algorithms ==================== -Algorithms can be specified as either an list of exact algorithm names +Algorithms can be specified as either a list of exact algorithm names or as a string of comma-separated algorithm names that may optionally -include wildcards. A '*' in a name matches zero or more characters and +include wildcards. An '*' in a name matches zero or more characters and a '?' matches exactly one character. When specifying algorithms as a string, it can also be prefixed with '^' diff --git a/docs/changes.rst b/docs/changes.rst index edf01513..14cf6859 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -100,7 +100,7 @@ Release 2.12.0 (10 Aug 2022) * Updated default for "ignore_encrypted" client connection option to ignore encrypted keys specified in an OpenSSH config file when no - passphrase is provided, similar to what was previosuly done for + passphrase is provided, similar to what was previously done for keys with default names. * Fixed an issue when using an SSH agent with RSA keys and an X.509 @@ -343,7 +343,7 @@ Release 2.7.1 (6 Sep 2021) * Fixed a couple of issues related to sending SSH_EXT_INFO messages. * Fixed an issue with using SSHAcceptor as an async context manager. - Thanks go to Paulo Costa for reporing this. + Thanks go to Paulo Costa for reporting this. * Fixed an issue where a tunnel wasn't always cleaned up properly when creating a remote listener. @@ -463,7 +463,7 @@ Release 2.6.0 (1 May 2021) 0.8.1. * Fixed problem with setting config options with percent substitutions - to 'none'. Percent subsitution should not be performed in this case. + to 'none'. Percent substitution should not be performed in this case. Thanks go to Yuqing Miao for finding and reporting this issue! * Fixed return type of filenames in SFTPClient scandir() and readlink() @@ -956,7 +956,7 @@ Release 1.16.1 (30 Mar 2019) * Added channel, connection, and env properties to SFTPServer instances, so connection and channel information can be used to influence the SFTP server's behavior. Previously, connection information was made - avaiable through the constructor, but channel and environment + available through the constructor, but channel and environment information was not. Now, all of these are available as properties on the SFTPServer instance without the need to explicitly store anything in a custom constructor. @@ -1319,7 +1319,7 @@ Release 1.12.0 (5 Feb 2018) * Updated key and certificate comment handling to be less sensitive to the encoding of non-ASCII characters. The get_comment() and set_comment() - functions now take an optional encoding paramter, defaulting to UTF-8 + functions now take an optional encoding parameter, defaulting to UTF-8 but allowing for others encodings. There's also a get_comment_bytes() function to get the comment data as bytes without performing Unicode decoding. @@ -1568,7 +1568,7 @@ Release 1.7.0 (7 Oct 2016) these signature algorithms. * Added new load_keypairs and load_public_keys API functions which - support expicitly loading keys using the same syntax that was + support explicitly loading keys using the same syntax that was previously available for specifying client_keys, authorized_client_keys, and server_host_keys arguments when creating SSH clients and servers. diff --git a/docs/index.rst b/docs/index.rst index c9313038..2e81e5ec 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -38,7 +38,7 @@ write calls operate on strings by default. If you want to send and receive binary data, you can set the encoding to `None` when the session is opened to make read and write operate on bytes instead. Alternate encodings can also be selected to change how strings are -convered to and from bytes. +converted to and from bytes. To check against a different set of server host keys, they can be provided in the known_hosts argument when the connection is opened: @@ -435,7 +435,7 @@ write calls operate on strings by default. If you want to send and receive binary data, you can set the encoding to `None` when the session is opened to make read and write operate on bytes instead. Alternate encodings can also be selected to change how strings are -convered to and from bytes. +converted to and from bytes. .. include:: ../examples/simple_server.py :literal: @@ -512,7 +512,7 @@ provide character echo and line editing. To better support interactive applications like the one above, AsyncSSH defaults to providing basic line editing for server sessions which request a pseudo-terminal. -When thise line editor is enabled, it defaults to delivering input to +When this line editor is enabled, it defaults to delivering input to the application a line at a time. Applications can switch between line and character at a time input using the :meth:`set_line_mode() ` method. Also, when in line diff --git a/tests/test_connection.py b/tests/test_connection.py index 39514862..18fb57e8 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -413,7 +413,7 @@ async def test_run_client(self): @asynctest async def test_connect_encrypted_key(self): - """Test connecting with encrytped client key and no passphrase""" + """Test connecting with encrypted client key and no passphrase""" async with self.connect(client_keys='ckey_encrypted', ignore_encrypted=True): @@ -618,7 +618,7 @@ async def test_get_server_host_key_proxy(self): async def test_get_server_host_key_proxy_failure(self): """Test failure retrieving a server host key using proxy command""" - # Leave out arguments to 'nc' to trigger a faliure + # Leave out arguments to 'nc' to trigger a failure proxy_command = 'nc' with self.assertRaises((OSError, asyncssh.ConnectionLost)): @@ -858,7 +858,7 @@ async def test_kex_algs(self): @asynctest async def test_duplicate_encryption_algs(self): - """Test connecting with an duplicated encryption algorithm""" + """Test connecting with a duplicated encryption algorithm""" with patch('asyncssh.connection.SSHClientConnection', _CheckAlgsClientConnection): @@ -1780,14 +1780,14 @@ async def test_connect_x509_self(self): @asynctest async def test_connect_x509_untrusted_self(self): - """Test connecting with untrusted X.509 self-signed certficate""" + """Test connecting with untrusted X.509 self-signed certificate""" with self.assertRaises(asyncssh.HostKeyNotVerifiable): await self.connect(x509_trusted_certs='root_ca_cert.pem') @asynctest async def test_connect_x509_revoked_self(self): - """Test connecting with revoked X.509 self-signed certficate""" + """Test connecting with revoked X.509 self-signed certificate""" with self.assertRaises(asyncssh.HostKeyNotVerifiable): await self.connect(known_hosts=([], [], [], ['root_ca_cert.pem'], diff --git a/tests/test_connection_auth.py b/tests/test_connection_auth.py index f9532e99..822c418b 100644 --- a/tests/test_connection_auth.py +++ b/tests/test_connection_auth.py @@ -1972,7 +1972,7 @@ async def test_kbdint_auth_callback_multi(self): pass @asynctest - async def test_kbdint_auth_callback_faliure(self): + async def test_kbdint_auth_callback_failure(self): """Test failure connecting with keyboard-interactive auth callback""" with self.assertRaises(asyncssh.PermissionDenied): diff --git a/tests/test_known_hosts.py b/tests/test_known_hosts.py index 68d6d970..00c9c47a 100644 --- a/tests/test_known_hosts.py +++ b/tests/test_known_hosts.py @@ -234,12 +234,12 @@ def test_missing_key_with_tag(self): self.check_match(b'@cert-authority xxx\n') def test_invalid_key(self): - """Test for line with invaid key""" + """Test for line with invalid key""" self.check_match(b'xxx yyy\n', ([], [], [], [], [], [], [])) def test_invalid_marker(self): - """Test for line with invaid marker""" + """Test for line with invalid marker""" with self.assertRaises(ValueError): self.check_match(b'@xxx yyy zzz\n') diff --git a/tests/test_public_key.py b/tests/test_public_key.py index 82440f37..70dbf733 100644 --- a/tests/test_public_key.py +++ b/tests/test_public_key.py @@ -2251,7 +2251,7 @@ def test_public_key(self): self.assertEqual(bool(get_x509_certificate_algs()), x509_available) def test_public_key_algorithm_mismatch(self): - """Test algorihm mismatch in SSH public key""" + """Test algorithm mismatch in SSH public key""" privkey = get_test_key('ssh-rsa') keydata = privkey.export_public_key('openssh') @@ -2272,7 +2272,7 @@ def test_pad_error(self): pkcs1_decrypt(b'', b'AES-128-CBC', os.urandom(16), 'x') def test_ec_explicit(self): - """Test EC certificate with explcit parameters""" + """Test EC certificate with explicit parameters""" if _openssl_available: # pragma: no branch for curve in ('secp256r1', 'secp384r1', 'secp521r1'):