diff --git a/docs/api/routing.rst b/docs/api/routing.rst index b8cd8db96..f38de6005 100644 --- a/docs/api/routing.rst +++ b/docs/api/routing.rst @@ -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: @@ -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 diff --git a/docs/changes/3.0.0.rst b/docs/changes/3.0.0.rst index dbbe729c4..16d214659 100644 --- a/docs/changes/3.0.0.rst +++ b/docs/changes/3.0.0.rst @@ -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 `__) + interpreter-specific stack frame instrospection capabilities. (`#1882 `__) Misc diff --git a/docs/ext/private_args.py b/docs/ext/private_args.py index 0fce55dbf..d4cb770c7 100644 --- a/docs/ext/private_args.py +++ b/docs/ext/private_args.py @@ -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. """ diff --git a/docs/user/tutorial-asgi.rst b/docs/user/tutorial-asgi.rst index 2c029c29f..265104a15 100644 --- a/docs/user/tutorial-asgi.rst +++ b/docs/user/tutorial-asgi.rst @@ -90,7 +90,7 @@ See also: :ref:`ASGI Server Installation `. While we're at it, let's install the handy `HTTPie `_ HTTP client to help us -excercise our app:: +exercise our app:: $ pip install httpie diff --git a/falcon/app.py b/falcon/app.py index 45af287c5..d3ecdf773 100644 --- a/falcon/app.py +++ b/falcon/app.py @@ -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). @@ -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, diff --git a/falcon/constants.py b/falcon/constants.py index b676be5ba..2fb9025bd 100644 --- a/falcon/constants.py +++ b/falcon/constants.py @@ -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 diff --git a/falcon/hooks.py b/falcon/hooks.py index e707426c3..4172e9da6 100644 --- a/falcon/hooks.py +++ b/falcon/hooks.py @@ -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 @@ -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 @@ -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] diff --git a/falcon/http_error.py b/falcon/http_error.py index 663c28419..98dd03513 100644 --- a/falcon/http_error.py +++ b/falcon/http_error.py @@ -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 diff --git a/falcon/inspect.py b/falcon/inspect.py index 46bd9ed88..d57d451af 100644 --- a/falcon/inspect.py +++ b/falcon/inspect.py @@ -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. diff --git a/falcon/request.py b/falcon/request.py index cab6c1b8f..410d5505f 100644 --- a/falcon/request.py +++ b/falcon/request.py @@ -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:: diff --git a/falcon/response.py b/falcon/response.py index f193f98e2..734250c9d 100644 --- a/falcon/response.py +++ b/falcon/response.py @@ -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 diff --git a/falcon/routing/compiled.py b/falcon/routing/compiled.py index 711d2ea12..65553e2c2 100644 --- a/falcon/routing/compiled.py +++ b/falcon/routing/compiled.py @@ -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. @@ -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. diff --git a/falcon/util/time.py b/falcon/util/time.py index b4286ff31..00a69f07c 100644 --- a/falcon/util/time.py +++ b/falcon/util/time.py @@ -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 diff --git a/tests/asgi/test_scheduled_callbacks.py b/tests/asgi/test_scheduled_callbacks.py index 5fb8045fd..aa47e2ad4 100644 --- a/tests/asgi/test_scheduled_callbacks.py +++ b/tests/asgi/test_scheduled_callbacks.py @@ -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() diff --git a/tests/test_custom_router.py b/tests/test_custom_router.py index da595050a..3640c8404 100644 --- a/tests/test_custom_router.py +++ b/tests/test_custom_router.py @@ -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') diff --git a/tests/test_headers.py b/tests/test_headers.py index 71cced44c..cabd3c942 100644 --- a/tests/test_headers.py +++ b/tests/test_headers.py @@ -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 diff --git a/tests/test_request_attrs.py b/tests/test_request_attrs.py index 42123fbaf..ba0f7e293 100644 --- a/tests/test_request_attrs.py +++ b/tests/test_request_attrs.py @@ -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