Skip to content

Commit

Permalink
Merge pull request #214 from timgates42/bugfix_typos
Browse files Browse the repository at this point in the history
Fix a few typos
  • Loading branch information
knipknap committed Jul 11, 2021
2 parents 37f4f63 + 9b7c722 commit fec88c8
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Exscript/emulators/command.py
Expand Up @@ -65,7 +65,7 @@ def add(self, command, response):
:type command: str|regex
:param command: A string or a compiled regular expression.
:type response: function|str
:param response: A reponse, or a response handler.
:param response: A response, or a response handler.
"""
command = re.compile(command)
self.response_list.append((command, response))
Expand Down
2 changes: 1 addition & 1 deletion Exscript/interpreter/regex.py
Expand Up @@ -24,7 +24,7 @@
import re
from .string import String

# Matches any opening parenthesis that is neither preceeded by a backslash
# Matches any opening parenthesis that is neither preceded by a backslash
# nor has a "?:" or "?<" appended.
bracket_re = re.compile(r'(?<!\\)\((?!\?[:<])', re.I)

Expand Down
2 changes: 1 addition & 1 deletion Exscript/interpreter/template.py
Expand Up @@ -67,7 +67,7 @@ def __init__(self, lexer, parser, parent, *args, **kwargs):
elif lexer.current_is('escaped_data'):
token = lexer.token()[1]
if token[1] == '$':
# An escaped $ is handeled by the Execute() token, so
# An escaped $ is handled by the Execute() token, so
# we do not strip the \ here.
buffer += token
else:
Expand Down
2 changes: 1 addition & 1 deletion Exscript/key.py
Expand Up @@ -32,7 +32,7 @@ class PrivateKey(object):

"""
Represents a cryptographic key, and may be used to authenticate
useing :class:`Exscript.protocols`.
using :class:`Exscript.protocols`.
"""
keytypes = set()

Expand Down
20 changes: 10 additions & 10 deletions Exscript/util/mail.py
Expand Up @@ -101,10 +101,10 @@ def _get_var_from_header_line(line):
return match.group(1).strip().lower(), match.group(2).strip()


def _cleanup_mail_addresses(receipients):
if isinstance(receipients, list):
receipients = ','.join(receipients)
rcpt = re.split(r'\s*[,;\r\n]\s*', receipients.lower())
def _cleanup_mail_addresses(recipients):
if isinstance(recipients, list):
recipients = ','.join(recipients)
rcpt = re.split(r'\s*[,;\r\n]\s*', recipients.lower())
return [str(r) for r in sorted(set(rcpt)) if r.strip()]

#
Expand Down Expand Up @@ -215,7 +215,7 @@ def get_sender(self):

def set_to(self, to):
"""
Replaces the current list of receipients in the 'to' field by
Replaces the current list of recipients in the 'to' field by
the given value. The value may be one of the following:
- A list of strings (email addresses).
Expand All @@ -229,7 +229,7 @@ def set_to(self, to):

def add_to(self, to):
"""
Adds the given list of receipients to the 'to' field.
Adds the given list of recipients to the 'to' field.
Accepts the same argument types as set_to().
:type to: string|list(string)
Expand Down Expand Up @@ -305,12 +305,12 @@ def get_bcc(self):
"""
return self.bcc

def get_receipients(self):
def get_recipients(self):
"""
Returns a list of all receipients (to, cc, and bcc).
Returns a list of all recipients (to, cc, and bcc).
:rtype: list(string)
:return: The email addresses of all receipients.
:return: The email addresses of all recipients.
"""
return self.get_to() + self.get_cc() + self.get_bcc()

Expand Down Expand Up @@ -469,7 +469,7 @@ def send(mail, server='localhost'):
:param server: The address of the mailserver.
"""
sender = mail.get_sender()
rcpt = mail.get_receipients()
rcpt = mail.get_recipients()
session = smtplib.SMTP(server)
message = MIMEMultipart()
message['Subject'] = mail.get_subject()
Expand Down
6 changes: 3 additions & 3 deletions Exscript/util/tty.py
Expand Up @@ -65,21 +65,21 @@ def get_terminal_size(default_rows=25, default_cols=80):
# Channel was redirected to an object that has no fileno()
pass
except ValueError:
# Channel was closed while attemting to read it
# Channel was closed while attempting to read it
pass
try:
fileno_list.append(sys.stdin.fileno())
except AttributeError:
pass
except ValueError:
# Channel was closed while attemting to read it
# Channel was closed while attempting to read it
pass
try:
fileno_list.append(sys.stderr.fileno())
except AttributeError:
pass
except ValueError:
# Channel was closed while attemting to read it
# Channel was closed while attempting to read it
pass

# Ask each channel for the terminal window size.
Expand Down
2 changes: 1 addition & 1 deletion Exscript/util/url.py
Expand Up @@ -182,7 +182,7 @@ def from_string(url, default_protocol='telnet'):
:type default_protocol: string
:param default_protocol: A protocol name.
:rtype: Url
:return: The Url object contructed from the given URL.
:return: The Url object constructed from the given URL.
"""
if url is None:
raise TypeError('Expected string but got' + type(url))
Expand Down

0 comments on commit fec88c8

Please sign in to comment.