Skip to content

Commit 4d89239

Browse files
authored
Merge pull request #3620 from mokashang/docs/fix-typos-in-comments-and-docs
docs: fix typos in comments and documentation
2 parents 0838273 + e094783 commit 4d89239

8 files changed

Lines changed: 9 additions & 9 deletions

File tree

docs/guide/intro.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Tornado can be roughly divided into three major components:
1313

1414
* A web framework (including `.RequestHandler` which is subclassed to
1515
create web applications, and various supporting classes).
16-
* Client- and server-side implementions of HTTP (`.HTTPServer` and
16+
* Client- and server-side implementations of HTTP (`.HTTPServer` and
1717
`.AsyncHTTPClient`).
1818
* An asynchronous networking library including the classes `.IOLoop`
1919
and `.IOStream`, which serve as the building blocks for the HTTP

docs/guide/structure.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Python.)
5050

5151
When the ``main`` function returns, the program exits, so most of the time for a
5252
web server ``main`` should run forever. Waiting on an `asyncio.Event` whose
53-
``set()`` method is never called is a convenient way to make an asynchronus
53+
``set()`` method is never called is a convenient way to make an asynchronous
5454
function run forever. (and if you wish to have ``main`` exit early as a part of
5555
a graceful shutdown procedure, you can call ``shutdown_event.set()`` to make it
5656
exit).

tornado/auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ class GoogleOAuth2Mixin(OAuth2Mixin):
855855
* Select a project, or create a new one.
856856
* Depending on permissions required, you may need to set your app to
857857
"testing" mode and add your account as a test user, or go through
858-
a verfication process. You may also need to use the "Enable
858+
a verification process. You may also need to use the "Enable
859859
APIs and Services" command to enable specific services.
860860
* In the sidebar on the left, select Credentials.
861861
* Click CREATE CREDENTIALS and click OAuth client ID.

tornado/escape.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def json_encode(value: Any) -> str:
9999
def json_decode(value: str | bytes) -> Any:
100100
"""Returns Python objects for the given JSON string.
101101
102-
Supports both `str` and `bytes` inputs. Equvalent to `json.loads`.
102+
Supports both `str` and `bytes` inputs. Equivalent to `json.loads`.
103103
"""
104104
return json.loads(value)
105105

@@ -393,7 +393,7 @@ def make_link(m: typing.Match) -> str:
393393
return f'<a href="{href}"{params}>{url}</a>'
394394

395395
# First HTML-escape so that our strings are all safe.
396-
# The regex is modified to avoid character entites other than &amp; so
396+
# The regex is modified to avoid character entities other than &amp; so
397397
# that we won't pick up &quot;, etc.
398398
text = _unicode(xhtml_escape(text))
399399
return _URL_RE.sub(make_link, text)

tornado/httputil.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class _ABNF:
7373
"""
7474

7575
# RFC 3986 (URI)
76-
# The URI hostname ABNF is both complex (including detailed vaildation of IPv4 and IPv6
76+
# The URI hostname ABNF is both complex (including detailed validation of IPv4 and IPv6
7777
# literals) and not strict enough (a lot of punctuation is allowed by the ABNF even though
7878
# it is not allowed by DNS). We simplify it by allowing square brackets and colons in any
7979
# position, not only for their use in IPv6 literals.

tornado/platform/asyncio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ async def _thread_manager(self) -> typing.AsyncGenerator[None, None]:
533533
self._thread.start()
534534
self._start_select()
535535
try:
536-
# The presense of this yield statement means that this coroutine
536+
# The presence of this yield statement means that this coroutine
537537
# is actually an asynchronous generator, which has a special
538538
# shutdown protocol. We wait at this yield point until the
539539
# event loop's shutdown_asyncgens method is called, at which point

tornado/test/httputil_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ def test_invalid_cookies(self):
666666
"django_language",
667667
parse_cookie("abc=def; unnamed; django_language=en").keys(),
668668
)
669-
# Even a double quote may be an unamed value.
669+
# Even a double quote may be an unnamed value.
670670
self.assertEqual(parse_cookie('a=b; "; c=d'), {"a": "b", "": '"', "c": "d"})
671671
# Spaces in names and values, and an equals sign in values.
672672
self.assertEqual(

tornado/web.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ def set_cookie(
720720
# Note change from _ to -.
721721
morsel["max-age"] = str(max_age)
722722
if httponly:
723-
# Note that SimpleCookie ignores the value here. The presense of an
723+
# Note that SimpleCookie ignores the value here. The presence of an
724724
# httponly (or secure) key is treated as true.
725725
morsel["httponly"] = True
726726
if secure:

0 commit comments

Comments
 (0)