Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #2329

Merged
merged 5 commits into from
Dec 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ Improved Documentation
Version 20.6.0
---------------

*Released, but unintentionally ommitting PR #1880, so was replaced by 20.6.1*
*Released, but unintentionally omitting PR #1880, so was replaced by 20.6.1*


Version 20.3.0
Expand Down Expand Up @@ -1090,7 +1090,7 @@ Version 18.12
* Fix Range header handling for static files (#1402)
* Fix the logger and make it work (#1397)
* Fix type pikcle->pickle in multiprocessing test
* Fix pickling blueprints Change the string passed in the "name" section of the namedtuples in Blueprint to match the name of the Blueprint module attribute name. This allows blueprints to be pickled and unpickled, without errors, which is a requirment of running Sanic in multiprocessing mode in Windows. Added a test for pickling and unpickling blueprints Added a test for pickling and unpickling sanic itself Added a test for enabling multiprocessing on an app with a blueprint (only useful to catch this bug if the tests are run on Windows).
* Fix pickling blueprints Change the string passed in the "name" section of the namedtuples in Blueprint to match the name of the Blueprint module attribute name. This allows blueprints to be pickled and unpickled, without errors, which is a requirement of running Sanic in multiprocessing mode in Windows. Added a test for pickling and unpickling blueprints Added a test for pickling and unpickling sanic itself Added a test for enabling multiprocessing on an app with a blueprint (only useful to catch this bug if the tests are run on Windows).
* Fix document for logging

Version 0.8
Expand Down Expand Up @@ -1129,7 +1129,7 @@ Version 0.8
* Content-length header on 204/304 responses (Arnulfo Solís)
* Extend WebSocketProtocol arguments and add docs (Bob Olde Hampsink, yunstanford)
* Update development status from pre-alpha to beta (Maksim Anisenkov)
* KeepAlive Timout log level changed to debug (Arnulfo Solís)
* KeepAlive Timeout log level changed to debug (Arnulfo Solís)
* Pin pytest to 3.3.2 because of pytest-dev/pytest#3170 (Maksim Aniskenov)
* Install Python 3.5 and 3.6 on docker container for tests (Shahin Azad)
* Add support for blueprint groups and nesting (Elias Tarhini)
Expand Down
2 changes: 1 addition & 1 deletion examples/amending_request_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def key_exist_handler(request):
if hasattr(request.ctx, "num"):
return text("num exist in request")

return text("num does not exist in reqeust")
return text("num does not exist in request")


app.run(host="0.0.0.0", port=8000, debug=True)
2 changes: 1 addition & 1 deletion sanic/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def register_named_middleware(
"""
Method for attaching middleware to specific routes. This is mainly an
internal tool for use by Blueprints to attach middleware to only its
specfic routes. But, it could be used in a more generalized fashion.
specific routes. But, it could be used in a more generalized fashion.

:param middleware: the middleware to execute
:param route_names: a list of the names of the endpoints
Expand Down
4 changes: 2 additions & 2 deletions sanic/blueprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class Blueprint(BaseSanic):

:param name: unique name of the blueprint
:param url_prefix: URL to be prefixed before all route URLs
:param host: IP Address of FQDN for the sanic server to use.
:param host: IP Address or FQDN for the sanic server to use.
:param version: Blueprint Version
:param strict_slashes: Enforce the API urls are requested with a
trailing */*
Expand Down Expand Up @@ -112,7 +112,7 @@ def __init__(
self,
name: str = None,
url_prefix: Optional[str] = None,
host: Optional[str] = None,
host: Optional[Union[List[str], str]] = None,
version: Optional[Union[int, str, float]] = None,
strict_slashes: Optional[bool] = None,
version_prefix: str = "/v",
Expand Down
2 changes: 1 addition & 1 deletion sanic/headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

# RFC's quoted-pair escapes are mostly ignored by browsers. Chrome, Firefox and
# curl all have different escaping, that we try to handle as well as possible,
# even though no client espaces in a way that would allow perfect handling.
# even though no client escapes in a way that would allow perfect handling.

# For more information, consult ../tests/test_requests.py

Expand Down
2 changes: 1 addition & 1 deletion sanic/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def import_string(module_name, package=None):
import a module or class by string path.

:module_name: str with path of module or path to import and
instanciate a class
instantiate a class
:returns: a module object or one instance from class if
module_name is a valid path to class

Expand Down
2 changes: 1 addition & 1 deletion sanic/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def get( # type: ignore
self, path: str, method: str, host: Optional[str]
) -> Tuple[Route, RouteHandler, Dict[str, Any]]:
"""
Retrieve a `Route` object containg the details about how to handle
Retrieve a `Route` object containing the details about how to handle
a response for a given request

:param request: the incoming request object
Expand Down
2 changes: 1 addition & 1 deletion sanic/tls.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def match_hostname(
def selector_sni_callback(
sslobj: ssl.SSLObject, server_name: str, ctx: CertSelector
) -> Optional[int]:
"""Select a certificate mathing the SNI."""
"""Select a certificate matching the SNI."""
# Call server_name_callback to store the SNI on sslobj
server_name_callback(sslobj, server_name, ctx)
# Find a new context matching the hostname
Expand Down
6 changes: 3 additions & 3 deletions sanic/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def load_module_from_file_location(
"""Returns loaded module provided as a file path.

:param args:
Coresponds to importlib.util.spec_from_file_location location
Corresponds to importlib.util.spec_from_file_location location
parameters,but with this differences:
- It has to be of a string or bytes type.
- You can also use here environment variables
Expand All @@ -58,10 +58,10 @@ def load_module_from_file_location(
If location parameter is of a bytes type, then use this encoding
to decode it into string.
:param args:
Coresponds to the rest of importlib.util.spec_from_file_location
Corresponds to the rest of importlib.util.spec_from_file_location
parameters.
:param kwargs:
Coresponds to the rest of importlib.util.spec_from_file_location
Corresponds to the rest of importlib.util.spec_from_file_location
parameters.

For example You can:
Expand Down
2 changes: 1 addition & 1 deletion scripts/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def release(args: Namespace):
cli.add_argument(
"--milestone",
"-ms",
help="Git Release milestone information to include in relase note",
help="Git Release milestone information to include in release note",
required=False,
)
cli.add_argument(
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ def open_local(paths, mode="r", encoding="utf8"):
"docutils",
"pygments",
"m2r2",
"mistune<2.0.0",
]

dev_require = tests_require + [
Expand Down
2 changes: 1 addition & 1 deletion tests/test_request_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def store(request):

@app.route("/")
def handler(request):
# Accessing non-existant key should fail with AttributeError
# Accessing non-existent key should fail with AttributeError
try:
invalid = request.ctx.missing
except AttributeError as e:
Expand Down