[Python-checkins] [3.11] Fix typos in documentation and comments (GH-102374) (#102376)

AlexWaygood webhook-mailer at python.org
Thu Mar 2 11:00:16 EST 2023


https://github.com/python/cpython/commit/3b1201daf6fa1fb6aac96868f489e2e17b28d356
commit: 3b1201daf6fa1fb6aac96868f489e2e17b28d356
branch: 3.11
author: Alex Waygood <Alex.Waygood at Gmail.com>
committer: AlexWaygood <Alex.Waygood at Gmail.com>
date: 2023-03-02T16:00:06Z
summary:

 [3.11] Fix typos in documentation and comments (GH-102374) (#102376)

[3.11] Fix typos in documentation and comments (GH-102374)

Found some duplicate `to`s in the documentation and some code comments and fixed them.

[Misc/NEWS.d/3.12.0a1.rst](https://github.com/python/cpython/blob/ed55c69ebd74178115cd8b080f7f8e7588cd5fda/Misc/NEWS.d/3.12.0a1.rst) also contains two duplicate `to`s, but I wasn't sure if it's ok to touch that file.  Looks auto generated.  I'm happy to amend the PR if requested. :)

Automerge-Triggered-By: GH:AlexWaygood

Co-authored-by: Michael K <michael-k at users.noreply.github.com>

files:
M Doc/library/sqlite3.rst
M Doc/library/typing.rst
M Lib/zoneinfo/_zoneinfo.py

diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
index fd8a032aff73..b5351a8feae8 100644
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -72,7 +72,7 @@ including `cursors`_ and `transactions`_.
 
 First, we need to create a new database and open
 a database connection to allow :mod:`!sqlite3` to work with it.
-Call :func:`sqlite3.connect` to to create a connection to
+Call :func:`sqlite3.connect` to create a connection to
 the database :file:`tutorial.db` in the current working directory,
 implicitly creating it if it does not exist:
 
diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst
index 02c3e0336d34..8db9a3f2c609 100644
--- a/Doc/library/typing.rst
+++ b/Doc/library/typing.rst
@@ -1343,7 +1343,7 @@ These are not used in annotations. They are building blocks for creating generic
 
         x: Ts          # Not valid
         x: tuple[Ts]   # Not valid
-        x: tuple[*Ts]  # The correct way to to do it
+        x: tuple[*Ts]  # The correct way to do it
 
     Type variable tuples can be used in the same contexts as normal type
     variables. For example, in class definitions, arguments, and return types::
diff --git a/Lib/zoneinfo/_zoneinfo.py b/Lib/zoneinfo/_zoneinfo.py
index de68380792f1..eede15b82710 100644
--- a/Lib/zoneinfo/_zoneinfo.py
+++ b/Lib/zoneinfo/_zoneinfo.py
@@ -302,7 +302,7 @@ def _utcoff_to_dstoff(trans_idx, utcoffsets, isdsts):
         # difference between utcoffset() and the "standard" offset, but
         # the "base offset" and "DST offset" are not encoded in the file;
         # we can infer what they are from the isdst flag, but it is not
-        # sufficient to to just look at the last standard offset, because
+        # sufficient to just look at the last standard offset, because
         # occasionally countries will shift both DST offset and base offset.
 
         typecnt = len(isdsts)



More information about the Python-checkins mailing list