[3.7] bpo-36766: Typos in docs and code comments (GH-13116). (GH-13136)



(cherry picked from commit 964663089547ca110199e23867b46b07ff4be88c)

Co-authored-by: penguindustin <penguindustin@gmail.com>





https://bugs.python.org/issue36766
diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py
index d729c7e..b9bf494 100644
--- a/Lib/test/datetimetester.py
+++ b/Lib/test/datetimetester.py
@@ -3344,7 +3344,7 @@
                     self.assertEqual(got, expected)
 
         # However, if they're different members, uctoffset is not ignored.
-        # Note that a time can't actually have an operand-depedent offset,
+        # Note that a time can't actually have an operand-dependent offset,
         # though (and time.utcoffset() passes None to tzinfo.utcoffset()),
         # so skip this test for time.
         if cls is not time:
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py
index 293393f..5540d00 100644
--- a/Lib/test/pickletester.py
+++ b/Lib/test/pickletester.py
@@ -2223,7 +2223,7 @@
 
         frame_size = self.FRAME_SIZE_TARGET
         num_frames = 20
-        # Large byte objects (dict values) intermitted with small objects
+        # Large byte objects (dict values) intermittent with small objects
         # (dict keys)
         obj = {i: bytes([i]) * frame_size for i in range(num_frames)}
 
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index a7be498..87bfa9f 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -987,7 +987,7 @@
         yield path
     finally:
         # In case the process forks, let only the parent remove the
-        # directory. The child has a diffent process id. (bpo-30028)
+        # directory. The child has a different process id. (bpo-30028)
         if dir_created and pid == os.getpid():
             rmtree(path)
 
diff --git a/Lib/test/test_dataclasses.py b/Lib/test/test_dataclasses.py
index 9c83459..a2c7cee 100755
--- a/Lib/test/test_dataclasses.py
+++ b/Lib/test/test_dataclasses.py
@@ -1458,7 +1458,7 @@
                              }
                          )
 
-        # Make sure that the returned dicts are actuall OrderedDicts.
+        # Make sure that the returned dicts are actually OrderedDicts.
         self.assertIs(type(d), OrderedDict)
         self.assertIs(type(d['y'][1]), OrderedDict)
 
diff --git a/Lib/test/test_importlib/test_lazy.py b/Lib/test/test_importlib/test_lazy.py
index ffd8dc6..28608e9 100644
--- a/Lib/test/test_importlib/test_lazy.py
+++ b/Lib/test/test_importlib/test_lazy.py
@@ -56,7 +56,7 @@
 
     def test_init(self):
         with self.assertRaises(TypeError):
-            # Classes that dono't define exec_module() trigger TypeError.
+            # Classes that don't define exec_module() trigger TypeError.
             util.LazyLoader(object)
 
     def new_module(self, source_code=None):
diff --git a/Lib/test/test_random.py b/Lib/test/test_random.py
index cbf3e41..f0822cd 100644
--- a/Lib/test/test_random.py
+++ b/Lib/test/test_random.py
@@ -707,7 +707,7 @@
         c = self.gen.choices(range(n), cum_weights=range(1, n+1), k=10000)
         self.assertEqual(a, c)
 
-        # Amerian Roulette
+        # American Roulette
         population = ['Red', 'Black', 'Green']
         weights = [18, 18, 2]
         cum_weights = [18, 36, 38]
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index 8eab447..422d6f2 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -4365,7 +4365,7 @@
                 self.assertEqual(s.recv(1024), b'FALSE\n')
                 s.write(b'PHA')
                 self.assertEqual(s.recv(1024), b'OK\n')
-                # optional doens't fail when client does not have a cert
+                # optional doesn't fail when client does not have a cert
                 s.write(b'HASCERT')
                 self.assertEqual(s.recv(1024), b'FALSE\n')
 
diff --git a/Lib/test/test_tools/test_i18n.py b/Lib/test/test_tools/test_i18n.py
index 8b2b90d..42e20f8 100644
--- a/Lib/test/test_tools/test_i18n.py
+++ b/Lib/test/test_tools/test_i18n.py
@@ -211,7 +211,7 @@
         self.assertIn('doc3', msgids)
 
     def test_classdocstring_early_colon(self):
-        """ Test docstring extraction for a class with colons occuring within
+        """ Test docstring extraction for a class with colons occurring within
         the parentheses.
         """
         msgids = self.extract_docstrings_from_str(dedent('''\