Skip to content

Commit 9b7c722

Browse files
committed
docs: Fix a few typos
There are small typos in: - Exscript/emulators/command.py - Exscript/interpreter/regex.py - Exscript/interpreter/template.py - Exscript/key.py - Exscript/util/mail.py - Exscript/util/tty.py - Exscript/util/url.py Fixes: - Should read `recipients` rather than `receipients`. - Should read `attempting` rather than `attemting`. - Should read `using` rather than `useing`. - Should read `response` rather than `reponse`. - Should read `preceded` rather than `preceeded`. - Should read `handled` rather than `handeled`. - Should read `constructed` rather than `contructed`.
1 parent 37f4f63 commit 9b7c722

7 files changed

Lines changed: 18 additions & 18 deletions

File tree

Exscript/emulators/command.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def add(self, command, response):
6565
:type command: str|regex
6666
:param command: A string or a compiled regular expression.
6767
:type response: function|str
68-
:param response: A reponse, or a response handler.
68+
:param response: A response, or a response handler.
6969
"""
7070
command = re.compile(command)
7171
self.response_list.append((command, response))

Exscript/interpreter/regex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import re
2525
from .string import String
2626

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

Exscript/interpreter/template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def __init__(self, lexer, parser, parent, *args, **kwargs):
6767
elif lexer.current_is('escaped_data'):
6868
token = lexer.token()[1]
6969
if token[1] == '$':
70-
# An escaped $ is handeled by the Execute() token, so
70+
# An escaped $ is handled by the Execute() token, so
7171
# we do not strip the \ here.
7272
buffer += token
7373
else:

Exscript/key.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class PrivateKey(object):
3232

3333
"""
3434
Represents a cryptographic key, and may be used to authenticate
35-
useing :class:`Exscript.protocols`.
35+
using :class:`Exscript.protocols`.
3636
"""
3737
keytypes = set()
3838

Exscript/util/mail.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ def _get_var_from_header_line(line):
101101
return match.group(1).strip().lower(), match.group(2).strip()
102102

103103

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

110110
#
@@ -215,7 +215,7 @@ def get_sender(self):
215215

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

230230
def add_to(self, to):
231231
"""
232-
Adds the given list of receipients to the 'to' field.
232+
Adds the given list of recipients to the 'to' field.
233233
Accepts the same argument types as set_to().
234234
235235
:type to: string|list(string)
@@ -305,12 +305,12 @@ def get_bcc(self):
305305
"""
306306
return self.bcc
307307

308-
def get_receipients(self):
308+
def get_recipients(self):
309309
"""
310-
Returns a list of all receipients (to, cc, and bcc).
310+
Returns a list of all recipients (to, cc, and bcc).
311311
312312
:rtype: list(string)
313-
:return: The email addresses of all receipients.
313+
:return: The email addresses of all recipients.
314314
"""
315315
return self.get_to() + self.get_cc() + self.get_bcc()
316316

@@ -469,7 +469,7 @@ def send(mail, server='localhost'):
469469
:param server: The address of the mailserver.
470470
"""
471471
sender = mail.get_sender()
472-
rcpt = mail.get_receipients()
472+
rcpt = mail.get_recipients()
473473
session = smtplib.SMTP(server)
474474
message = MIMEMultipart()
475475
message['Subject'] = mail.get_subject()

Exscript/util/tty.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,21 +65,21 @@ def get_terminal_size(default_rows=25, default_cols=80):
6565
# Channel was redirected to an object that has no fileno()
6666
pass
6767
except ValueError:
68-
# Channel was closed while attemting to read it
68+
# Channel was closed while attempting to read it
6969
pass
7070
try:
7171
fileno_list.append(sys.stdin.fileno())
7272
except AttributeError:
7373
pass
7474
except ValueError:
75-
# Channel was closed while attemting to read it
75+
# Channel was closed while attempting to read it
7676
pass
7777
try:
7878
fileno_list.append(sys.stderr.fileno())
7979
except AttributeError:
8080
pass
8181
except ValueError:
82-
# Channel was closed while attemting to read it
82+
# Channel was closed while attempting to read it
8383
pass
8484

8585
# Ask each channel for the terminal window size.

Exscript/util/url.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def from_string(url, default_protocol='telnet'):
182182
:type default_protocol: string
183183
:param default_protocol: A protocol name.
184184
:rtype: Url
185-
:return: The Url object contructed from the given URL.
185+
:return: The Url object constructed from the given URL.
186186
"""
187187
if url is None:
188188
raise TypeError('Expected string but got' + type(url))

0 commit comments

Comments
 (0)