Skip to content

Commit

Permalink
chore: fix typos discovered by codespell (#2092)
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss authored Aug 7, 2022
1 parent 99c24f1 commit 492087f
Show file tree
Hide file tree
Showing 17 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions docs/api/routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ A custom router is any class that implements the following interface:
Suffixed Responders
-------------------

While Falcon encourages the REST architectural style, it is flexible enough to accomodate other
While Falcon encourages the REST architectural style, it is flexible enough to accommodate other
paradigms. Consider the task of building an API for a calculator which can both add and subtract
two numbers. You could implement the
following:
Expand Down Expand Up @@ -456,7 +456,7 @@ style:
app.add_route('/subtract', calc, suffix='subtract')
In the second iteration, using Suffixed Responders, we're able to group responders based on their
actions rather than the data they represent. This gives us added flexibility to accomodate
actions rather than the data they represent. This gives us added flexibility to accommodate
situations in which a purely RESTful approach simply doesn't fit.

Default Router
Expand Down
2 changes: 1 addition & 1 deletion docs/changes/3.0.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ Fixed
could raise an unexpected ``AttributeError`` when running under certain
applications servers such as Meinheld. This has been fixed so that
:func:`~falcon.deprecated` no longer relies on the availability of
interpreter-specific stack frame instrospection capabilites. (`#1882 <https://github.com/falconry/falcon/issues/1882>`__)
interpreter-specific stack frame instrospection capabilities. (`#1882 <https://github.com/falconry/falcon/issues/1882>`__)


Misc
Expand Down
2 changes: 1 addition & 1 deletion docs/ext/private_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

"""Private args module extension for Sphinx.
This extension exludes underscore-prefixed args and kwargs from the function
This extension excludes underscore-prefixed args and kwargs from the function
signature.
"""

Expand Down
2 changes: 1 addition & 1 deletion docs/user/tutorial-asgi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ See also: :ref:`ASGI Server Installation <install_asgi_server>`.

While we're at it, let's install the handy
`HTTPie <https://github.com/jakubroztocil/httpie>`_ HTTP client to help us
excercise our app::
exercise our app::

$ pip install httpie

Expand Down
4 changes: 2 additions & 2 deletions falcon/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ def add_static_route(
Warning:
If you need to serve large files and/or progressive downloads (such
as in the case of video streaming) through the Falcon app, check
that your application server's timeout settings can accomodate the
that your application server's timeout settings can accommodate the
expected request duration (for instance, the popular Gunicorn kills
``sync`` workers after 30 seconds unless configured otherwise).
Expand Down Expand Up @@ -842,7 +842,7 @@ def set_error_serializer(self, serializer):
Note:
A custom serializer set with this method may not be called if the
default error handler for :class:`~.HTTPError` has been overriden.
default error handler for :class:`~.HTTPError` has been overridden.
See :meth:`~.add_error_handler` for more details.
The :class:`~.HTTPError` class contains helper methods,
Expand Down
2 changes: 1 addition & 1 deletion falcon/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
MEDIA_XML = 'application/xml'

# NOTE(kgriffs): RFC 4329 recommends application/* over text/.
# futhermore, parsers are required to respect the Unicode
# furthermore, parsers are required to respect the Unicode
# encoding signature, if present in the document, and to default
# to UTF-8 when not present. Note, however, that implementations
# are not required to support anything besides UTF-8, so it is
Expand Down
6 changes: 3 additions & 3 deletions falcon/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def _wrap_with_after(responder, action, action_args, action_kwargs, is_async):
responder: The responder method to wrap.
action: A function with a signature similar to a resource responder
method, taking the form ``func(req, resp, resource)``.
action_args: Additional positional agruments to pass to *action*.
action_args: Additional positional arguments to pass to *action*.
action_kwargs: Additional keyword arguments to pass to *action*.
is_async: Set to ``True`` for cythonized responders that are
actually coroutine functions, since such responders can not
Expand Down Expand Up @@ -227,7 +227,7 @@ def _wrap_with_before(responder, action, action_args, action_kwargs, is_async):
responder: The responder method to wrap.
action: A function with a similar signature to a resource responder
method, taking the form ``func(req, resp, resource, params)``.
action_args: Additional positional agruments to pass to *action*.
action_args: Additional positional arguments to pass to *action*.
action_kwargs: Additional keyword arguments to pass to *action*.
is_async: Set to ``True`` for cythonized responders that are
actually coroutine functions, since such responders can not
Expand Down Expand Up @@ -289,7 +289,7 @@ def _merge_responder_args(args, kwargs, argnames):
# signature.
for i, argname in enumerate(argnames):
# NOTE(kgriffs): extra_argnames may contain keyword arguments,
# which wont be in the args list, and are already in the kwargs
# which won't be in the args list, and are already in the kwargs
# dict anyway, so detect and skip them.
if argname not in kwargs:
kwargs[argname] = args[i]
2 changes: 1 addition & 1 deletion falcon/http_error.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,6 @@ def to_xml(self):
)


# NOTE: initialized in falcon.media.json, that is always imported since Request/Respose
# NOTE: initialized in falcon.media.json, that is always imported since Request/Response
# are imported by falcon init.
_DEFAULT_JSON_HANDLER = None
2 changes: 1 addition & 1 deletion falcon/inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def __init__(self, prefix: str, name: str, source_info: str):


class ErrorHandlerInfo(_Traversable):
"""Desribes an error handler.
"""Describes an error handler.
Args:
error (name): The name of the error type.
Expand Down
2 changes: 1 addition & 1 deletion falcon/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ class Request:
block indefinitely. It's a good idea to test your WSGI
server to find out how it behaves.
This can be particulary problematic when a request body is
This can be particularly problematic when a request body is
expected, but none is given. In this case, the following
call blocks under certain WSGI servers::
Expand Down
2 changes: 1 addition & 1 deletion falcon/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ def append_link(
"""

# PERF(kgriffs): Heuristic to detect possiblity of an extension
# PERF(kgriffs): Heuristic to detect possibility of an extension
# relation type, in which case it will be a URL that may contain
# reserved characters. Otherwise, don't waste time running the
# string through uri.encode
Expand Down
4 changes: 2 additions & 2 deletions falcon/routing/compiled.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def find(self, uri, req=None):
def _require_coroutine_responders(self, method_map):
for method, responder in method_map.items():
# NOTE(kgriffs): We don't simply wrap non-async functions
# since they likely peform relatively long blocking
# since they likely perform relatively long blocking
# operations that need to be explicitly made non-blocking
# by the developer; raising an error helps highlight this
# issue.
Expand All @@ -345,7 +345,7 @@ def let(responder=responder):
def _require_non_coroutine_responders(self, method_map):
for method, responder in method_map.items():
# NOTE(kgriffs): We don't simply wrap non-async functions
# since they likely peform relatively long blocking
# since they likely perform relatively long blocking
# operations that need to be explicitly made non-blocking
# by the developer; raising an error helps highlight this
# issue.
Expand Down
2 changes: 1 addition & 1 deletion falcon/util/time.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def utcoffset(self, dt):
Returns:
datetime.timedelta: GMT offset, which is equivalent to UTC and
so is aways 0.
so is always 0.
"""

return self.GMT_ZERO
Expand Down
2 changes: 1 addition & 1 deletion tests/asgi/test_scheduled_callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ async def background_job_async():
assert result.status_code == 500

# NOTE(kgriffs): Remove default handlers so that we can check the raised
# exception is what we expecte.
# exception is what we expected.
app._error_handlers.clear()
with pytest.raises(TypeError) as exinfo:
client.simulate_put()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_custom_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def find(self, uri):
assert 'my-url-name' in check

# NOTE(kgriffs): Extra values must be passed as kwargs, since that makes
# it a lot easier for overriden methods to simply ignore options they
# it a lot easier for overridden methods to simply ignore options they
# don't care about.
with pytest.raises(TypeError):
app.add_route('/test', 'resource', 'xarg1', 'xarg2')
Expand Down
2 changes: 1 addition & 1 deletion tests/test_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ def test_default_value(self, client):
value = req.get_header('X-Not-Found', default='some-value')
assert value == 'some-value'

# Excercise any result caching and associated abuse mitigations
# Exercise any result caching and associated abuse mitigations
for i in range(10000):
assert req.get_header('X-Not-Found-{0}'.format(i)) is None

Expand Down
2 changes: 1 addition & 1 deletion tests/test_request_attrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,7 @@ def test_etag_is_missing(self, asgi):
def test_etag_parsing_helper(self, asgi, header_value):
# NOTE(kgriffs): Test a couple of cases that are not directly covered
# elsewhere (but that we want the helper to still support
# for the sake of avoiding suprises if they are ever called without
# for the sake of avoiding surprises if they are ever called without
# preflighting the header value).

assert _parse_etags(header_value) is None
Expand Down

0 comments on commit 492087f

Please sign in to comment.