Skip to content

Commit

Permalink
📝 Correct misspellings in Python modules
Browse files Browse the repository at this point in the history
  • Loading branch information
webknjaz committed Sep 17, 2020
1 parent cb9d3f4 commit d5790dc
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 11 deletions.
4 changes: 4 additions & 0 deletions cheroot/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
# Start a server on the abstract UNIX socket CherootServer
cheroot myapp.wsgi --bind @CherootServer
.. spelling::
cli
"""

import argparse
Expand Down
10 changes: 4 additions & 6 deletions cheroot/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@ def __init__(self, server):
def put(self, conn):
"""Put idle connection into the ConnectionManager to be managed.
Args:
conn (cheroot.server.HTTPConnection): HTTP connection
to be managed.
:param conn: HTTP connection to be managed
:type conn: cheroot.server.HTTPConnection
"""
conn.last_used = time.time()
# if this conn doesn't have any more data waiting to be read,
Expand Down Expand Up @@ -119,9 +118,8 @@ def get_conn(self): # noqa: C901 # FIXME
Any connection returned by this method will need to be `put`
back if it should be examined again for another request.
Returns:
cheroot.server.HTTPConnection instance, or None.
:returns: HTTPConnection instance, or None
:rtype: cheroot.server.HTTPConnection
"""
# return a readable connection if any exist
with suppress(IndexError):
Expand Down
4 changes: 4 additions & 0 deletions cheroot/ssl/pyopenssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
<cheroot.ssl.pyopenssl.pyOpenSSLAdapter.context>` is :py:data:`None`,
but ``.private_key`` and ``.certificate`` are both given and valid, they
will be read, and the context will be automatically created from them.
.. spelling::
pyopenssl
"""

from __future__ import absolute_import, division, print_function
Expand Down
9 changes: 7 additions & 2 deletions cheroot/test/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
"""Tests to verify the command line interface."""
"""Tests to verify the command line interface.
.. spelling::
cli
"""
# -*- coding: utf-8 -*-
# vim: set fileencoding=utf-8 :
import sys
Expand Down Expand Up @@ -34,7 +39,7 @@
def test_parse_wsgi_bind_addr(raw_bind_addr, expected_bind_addr):
"""Check the parsing of the --bind option.
Verify some of the supported addresses and the excpected return value.
Verify some of the supported addresses and the expected return value.
"""
assert parse_wsgi_bind_addr(raw_bind_addr) == expected_bind_addr

Expand Down
2 changes: 1 addition & 1 deletion cheroot/test/webtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class WebCase(unittest.TestCase):
def _Conn(self):
"""Return HTTPConnection or HTTPSConnection based on self.scheme.
* from http.client.
* from :py:mod:`python:http.client`.
"""
cls_name = '{scheme}Connection'.format(scheme=self.scheme.upper())
return getattr(http_client, cls_name)
Expand Down
7 changes: 6 additions & 1 deletion cheroot/workers/threadpool.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
"""A thread-based worker pool."""
"""A thread-based worker pool.
.. spelling::
joinable
"""

from __future__ import absolute_import, division, print_function
__metaclass__ = type
Expand Down
2 changes: 1 addition & 1 deletion cheroot/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def _encode_status(status):
According to :pep:`3333`, when using Python 3, the response status
and headers must be bytes masquerading as Unicode; that is, they
must be of type "str" but are restricted to code points in the
"latin-1" set.
"Latin-1" set.
"""
if six.PY2:
return status
Expand Down
1 change: 1 addition & 0 deletions docs/spelling_wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ ssl
stdout
subclasses
submodules
subpackages
syscall
systemd
threadpool
Expand Down

0 comments on commit d5790dc

Please sign in to comment.