]> granicus.if.org Git - python/commitdiff
#18741: fix more typos. Patch by FĂ©vry Thibault.
authorEzio Melotti <ezio.melotti@gmail.com>
Sat, 17 Aug 2013 13:11:40 +0000 (16:11 +0300)
committerEzio Melotti <ezio.melotti@gmail.com>
Sat, 17 Aug 2013 13:11:40 +0000 (16:11 +0300)
22 files changed:
Lib/concurrent/futures/process.py
Lib/ctypes/test/runtests.py
Lib/ctypes/test/test_cfuncs.py
Lib/ctypes/test/test_numbers.py
Lib/ctypes/test/test_refcounts.py
Lib/ctypes/test/test_structures.py
Lib/distutils/command/install.py
Lib/distutils/command/sdist.py
Lib/distutils/tests/test_build_clib.py
Lib/idlelib/idle_test/mock_tk.py
Lib/idlelib/idle_test/test_formatparagraph.py
Lib/lib2to3/fixes/fix_itertools.py
Lib/lib2to3/fixes/fix_metaclass.py
Lib/lib2to3/tests/test_parser.py
Lib/sqlite3/test/regression.py
Lib/sqlite3/test/types.py
Lib/test/support/__init__.py
Lib/test/test_email/test_headerregistry.py
Lib/unittest/test/test_case.py
Lib/unittest/test/test_loader.py
Lib/unittest/test/test_program.py
Lib/xml/etree/ElementTree.py

index 04238a7ace8c44bc9b3556b6415beb99d05a1f46..adf2ab47594adfe8ac7cf8d536fd766a4c0a54af 100644 (file)
@@ -297,7 +297,7 @@ def _check_system_limits():
         # sysconf not available or setting not available
         return
     if nsems_max == -1:
-        # indetermine limit, assume that limit is determined
+        # indetermined limit, assume that limit is determined
         # by available memory only
         return
     if nsems_max >= 256:
@@ -411,7 +411,7 @@ class ProcessPoolExecutor(_base.Executor):
             self._result_queue.put(None)
             if wait:
                 self._queue_management_thread.join()
-        # To reduce the risk of openning too many files, remove references to
+        # To reduce the risk of opening too many files, remove references to
         # objects that use file descriptors.
         self._queue_management_thread = None
         self._call_queue = None
index ec31fc831dd6b991518421f46ca2f4829c226b46..b7a2b264721eddea3c685204f6409f3fd656e71a 100644 (file)
@@ -2,7 +2,7 @@
 
 Run all tests found in this directory, and print a summary of the results.
 Command line flags:
-  -q     quiet mode: don't prnt anything while the tests are running
+  -q     quiet mode: don't print anything while the tests are running
   -r     run tests repeatedly, look for refcount leaks
   -u<resources>
          Add resources to the lits of allowed resources. '*' allows all
index f4bd3b16c370a7d4c1cde4b70d745197d00ec764..a080496713abad032c21926014fd289fd83fa4c3 100644 (file)
@@ -188,7 +188,7 @@ class CFunctions(unittest.TestCase):
         self.assertEqual(self._dll.tv_i(-42), None)
         self.assertEqual(self.S(), -42)
 
-# The following repeates the above tests with stdcall functions (where
+# The following repeats the above tests with stdcall functions (where
 # they are available)
 try:
     WinDLL
index 8753a07c54010397d60b71420987aa63cf3c5966..e697a254ba340b98455f330c765c8dada33f466a 100644 (file)
@@ -213,7 +213,7 @@ class NumberTestCase(unittest.TestCase):
 
     def test_init(self):
         # c_int() can be initialized from Python's int, and c_int.
-        # Not from c_long or so, which seems strange, abd should
+        # Not from c_long or so, which seems strange, abc should
         # probably be changed:
         self.assertRaises(TypeError, c_int, c_long(42))
 
index 5613e7a3871c3270d85fde1d9615a21619e79baf..a483bb0bbced315f10fc039ccc113a0c91fc8254 100644 (file)
@@ -44,7 +44,7 @@ class RefcountTestCase(unittest.TestCase):
         # this is the standard refcount for func
         self.assertEqual(grc(func), 2)
 
-        # the CFuncPtr instance holds atr least one refcount on func:
+        # the CFuncPtr instance holds at least one refcount on func:
         f = OtherCallback(func)
         self.assertTrue(grc(func) > 2)
 
@@ -61,7 +61,7 @@ class RefcountTestCase(unittest.TestCase):
         x = X()
         x.a = OtherCallback(func)
 
-        # the CFuncPtr instance holds atr least one refcount on func:
+        # the CFuncPtr instance holds at least one refcount on func:
         self.assertTrue(grc(func) > 2)
 
         # and may release it again
@@ -74,7 +74,7 @@ class RefcountTestCase(unittest.TestCase):
 
         f = OtherCallback(func)
 
-        # the CFuncPtr instance holds atr least one refcount on func:
+        # the CFuncPtr instance holds at least one refcount on func:
         self.assertTrue(grc(func) > 2)
 
         # create a cycle
index d764ce2ed94b98bc05b61dcc5ce9f6545833ef1b..9d5b99e2f82d70969b5c412632fe90b1fa0163ac 100644 (file)
@@ -108,7 +108,7 @@ class StructureTestCase(unittest.TestCase):
     def test_emtpy(self):
         # I had problems with these
         #
-        # Although these are patological cases: Empty Structures!
+        # Although these are pathological cases: Empty Structures!
         class X(Structure):
             _fields_ = []
 
index 9b1c36af828f8a8c022e7f9db81954afab1005da..3c675d1182f55bf2ff09375511745b605063d7ad 100644 (file)
@@ -545,7 +545,7 @@ class install(Command):
         self.extra_dirs = extra_dirs
 
     def change_roots(self, *names):
-        """Change the install direcories pointed by name using root."""
+        """Change the install directories pointed by name using root."""
         for name in names:
             attr = "install_" + name
             setattr(self, attr, change_root(self.root, getattr(self, attr)))
index a9429a4296a7d5b2490ea522b23d0900ce171cf9..116f67ef9be4d3742dd7be0113a3851edcf8beea 100644 (file)
@@ -175,7 +175,7 @@ class sdist(Command):
         depends on the user's options.
         """
         # new behavior when using a template:
-        # the file list is recalculated everytime because
+        # the file list is recalculated every time because
         # even if MANIFEST.in or setup.py are not changed
         # the user might have added some files in the tree that
         # need to be included.
index 69bd2bf6241e15f968ed400aa643f2ab4ca9baf9..ee1c04162b42580721d11b364b61d92db7ba9fed 100644 (file)
@@ -77,7 +77,7 @@ class BuildCLibTestCase(support.TempdirManager,
 
         cmd.compiler = FakeCompiler()
 
-        # build_libraries is also doing a bit of typoe checking
+        # build_libraries is also doing a bit of typo checking
         lib = [('name', {'sources': 'notvalid'})]
         self.assertRaises(DistutilsSetupError, cmd.build_libraries, lib)
 
index 3f6c579c3c7f8b6553da7ba8d4ab8cf091f563a8..762bbc905db9ae8073ecbbe90910365b14f8fc1c 100644 (file)
@@ -35,7 +35,7 @@ class Mbox:
     """Mock for tkinter.messagebox with an Mbox_func for each function.
 
     This module was 'tkMessageBox' in 2.x; hence the 'import as' in  3.x.
-    Example usage in test_module.py for testing functios in module.py:
+    Example usage in test_module.py for testing functions in module.py:
     ---
 from idlelib.idle_test.mock_tk import Mbox
 import module
@@ -98,7 +98,7 @@ class Text:
 
         This implements .index without converting the result back to a string.
         The result is contrained by the number of lines and linelengths of
-        self.data. For many indexes, the result is initally (1, 0).
+        self.data. For many indexes, the result is initially (1, 0).
 
         The input index may have any of several possible forms:
         * line.char float: converted to 'line.char' string;
@@ -149,7 +149,7 @@ class Text:
 
        -1: position before terminal \n; for .insert(), .delete
        0: position after terminal \n; for .get, .delete index 1
-       1: same viewed as begininning of non-existent next line (for .index)
+       1: same viewed as beginning of non-existent next line (for .index)
        '''
         n = len(self.data)
         if endflag == 1:
@@ -271,7 +271,7 @@ class Text:
         "Scroll screen to make the character at INDEX is visible."
         pass
 
-    #  The following is a Misc method inheritet by Text.
+    #  The following is a Misc method inherited by Text.
     # It should properly go in a Misc mock, but is included here for now.
 
     def bind(sequence=None, func=None, add=None):
index 2ec8232335bf0bba723179a5d5a43ab48fa28468..818c9d4b674b3be219e440bc25a693141372162c 100644 (file)
@@ -244,7 +244,7 @@ class FormatEventTest(unittest.TestCase):
     """Test the formatting of text inside a Text widget.
 
     This is done with FormatParagraph.format.paragraph_event,
-    which calls funtions in the module as appropriate.
+    which calls functions in the module as appropriate.
     """
     test_string = (
         "    '''this is a test of a reformat for a triple "
index 63346b9220283972040b23c62ccb4fe2574272ee..8e78d6c689f4396421414248f15b39e01a844833 100644 (file)
@@ -34,8 +34,8 @@ class FixItertools(fixer_base.BaseFix):
             # Remove the 'itertools'
             prefix = it.prefix
             it.remove()
-            # Replace the node wich contains ('.', 'function') with the
-            # function (to be consistant with the second part of the pattern)
+            # Replace the node which contains ('.', 'function') with the
+            # function (to be consistent with the second part of the pattern)
             dot.remove()
             func.parent.replace(func)
 
index 7d4d002f976bbbe57fca9f7d14116fe6672260be..d4f99a38c7900bef5e1d94551dfaca5ebcf8fe49 100644 (file)
@@ -71,7 +71,7 @@ def fixup_parse_tree(cls_node):
 def fixup_simple_stmt(parent, i, stmt_node):
     """ if there is a semi-colon all the parts count as part of the same
         simple_stmt.  We just want the __metaclass__ part so we move
-        everything efter the semi-colon into its own simple_stmt node
+        everything after the semi-colon into its own simple_stmt node
     """
     for semi_ind, node in enumerate(stmt_node.children):
         if node.type == token.SEMI: # *sigh*
index 3968e6a41a6e418a7414f5943a1a59c2bd099bcd..09b439a07a21b9d712b8f7adc7ace657ee4d7480 100644 (file)
@@ -77,7 +77,7 @@ class TestRaiseChanges(GrammarTest):
         self.invalid_syntax("raise E from")
 
 
-# Adapated from Python 3's Lib/test/test_grammar.py:GrammarTests.testFuncdef
+# Adaptated from Python 3's Lib/test/test_grammar.py:GrammarTests.testFuncdef
 class TestFunctionAnnotations(GrammarTest):
     def test_1(self):
         self.validate("""def f(x) -> list: pass""")
index 5e2fbf94351fe16895c3041a42fed4dfcc24c46a..b927cb3ed1857d904808eb2bc41914879a1f7030 100644 (file)
@@ -161,7 +161,8 @@ class RegressionTests(unittest.TestCase):
 
     def CheckCursorConstructorCallCheck(self):
         """
-        Verifies that cursor methods check wether base class __init__ was called.
+        Verifies that cursor methods check whether base class __init__ was
+        called.
         """
         class Cursor(sqlite.Cursor):
             def __init__(self, con):
@@ -187,7 +188,8 @@ class RegressionTests(unittest.TestCase):
 
     def CheckConnectionConstructorCallCheck(self):
         """
-        Verifies that connection methods check wether base class __init__ was called.
+        Verifies that connection methods check whether base class __init__ was
+        called.
         """
         class Connection(sqlite.Connection):
             def __init__(self, name):
index 3b4cb6d1d1ad08e6b005aafadf568cc526fbcc84..a8fdad9ee13e3531809bf891e490b7f2b280cb05 100644 (file)
@@ -229,7 +229,7 @@ class DeclTypesTests(unittest.TestCase):
         self.assertEqual(type(value), float)
 
     def CheckNumber2(self):
-        """Checks wether converter names are cut off at '(' characters"""
+        """Checks whether converter names are cut off at '(' characters"""
         self.cur.execute("insert into test(n2) values (5)")
         value = self.cur.execute("select n2 from test").fetchone()[0]
         # if the converter is not used, it's an int instead of a float
index 5924f156f75b23b8f8ccba4d4429169709c52e7e..0b3bd68299efb6522d1c1cf4b8a9824ddba2da3d 100644 (file)
@@ -246,7 +246,7 @@ def unload(name):
 
 if sys.platform.startswith("win"):
     def _waitfor(func, pathname, waitall=False):
-        # Peform the operation
+        # Perform the operation
         func(pathname)
         # Now setup the wait loop
         if waitall:
@@ -262,7 +262,7 @@ if sys.platform.startswith("win"):
         # required when contention occurs.
         timeout = 0.001
         while timeout < 1.0:
-            # Note we are only testing for the existance of the file(s) in
+            # Note we are only testing for the existence of the file(s) in
             # the contents of the directory regardless of any security or
             # access rights.  If we have made it this far, we have sufficient
             # permissions to do that much using Python's equivalent of the
index f754a324316ba4d583a5a1510ca30116b9e65d39..f829f83e320b0ce11f40b10e942c8f15e0e22bf1 100644 (file)
@@ -531,7 +531,7 @@ class TestContentTypeHeader(TestHeaderBase):
              '\tname*1*=%2A%2A%2Afun%2A%2A%2A%20;\tname*2="is it not.pdf"\n'),
             ),
 
-        # Make sure we also handle it if there are spurrious double qoutes.
+        # Make sure we also handle it if there are spurious double quotes.
         'rfc2231_encoded_with_double_quotes': (
             ("text/plain;"
                 '\tname*0*="us-ascii\'\'This%20is%20even%20more%20";'
@@ -711,8 +711,8 @@ class TestContentTypeHeader(TestHeaderBase):
         # in double quotes, making the value a valid non-encoded string.  The
         # old parser decodes this just like the previous case, which may be the
         # better Postel rule, but could equally result in borking headers that
-        # intentially have quoted quotes in them.  We could get this 98% right
-        # if we treat it as a quoted string *unless* it matches the
+        # intentionally have quoted quotes in them.  We could get this 98%
+        # right if we treat it as a quoted string *unless* it matches the
         # charset'lang'value pattern exactly *and* there is at least one
         # encoded segment.  Implementing that algorithm will require some
         # refactoring, so I haven't done it (yet).
@@ -944,7 +944,7 @@ class TestMIMEVersionHeader(TestHeaderBase):
             [errors.InvalidHeaderDefect]),
 
         # Unrecoverable invalid values.  We *could* apply more heuristics to
-        # get someing out of the first two, but doing so is not worth the
+        # get something out of the first two, but doing so is not worth the
         # effort.
 
         'non_comment_garbage_before': (
@@ -1541,13 +1541,13 @@ class TestFolding(TestHeaderBase):
     def test_fold_unstructured_with_commas(self):
         # The old wrapper would fold this at the commas.
         h = self.make_header('Subject', "This header is intended to "
-            "demonstrate, in a fairly susinct way, that we now do "
+            "demonstrate, in a fairly succinct way, that we now do "
             "not give a , special treatment in unstructured headers.")
         self.assertEqual(
             h.fold(policy=policy.default.clone(max_line_length=60)),
             textwrap.dedent("""\
                 Subject: This header is intended to demonstrate, in a fairly
-                 susinct way, that we now do not give a , special treatment
+                 succinct way, that we now do not give a , special treatment
                  in unstructured headers.
                  """))
 
index fdb2e78462ee0724fe5ed2c54c27d8ed431c1a9e..d171451f2cf60217c2d42198f78a76ec664e9ebf 100644 (file)
@@ -1054,7 +1054,7 @@ test case
                 self.assertWarns(DeprecationWarning, _runtime_warn)
 
     def testAssertWarnsContext(self):
-        # Believe it or not, it is preferrable to duplicate all tests above,
+        # Believe it or not, it is preferable to duplicate all tests above,
         # to make sure the __warningregistry__ $@ is circumvented correctly.
         def _runtime_warn():
             warnings.warn("foo", RuntimeWarning)
index e86c09b3595e9dfa8f384755e5498556e9ac0ebb..f1f8ecd978c523beaf53c031c75be9228f169b1f 100644 (file)
@@ -324,7 +324,7 @@ class Test_TestLoader(unittest.TestCase):
     # Does loadTestsFromName raise TypeError when the `module` argument
     # isn't a module object?
     #
-    # XXX Accepts the not-a-module object, ignorning the object's type
+    # XXX Accepts the not-a-module object, ignoring the object's type
     # This should raise an exception or the method name should be changed
     #
     # XXX Some people are relying on this, so keep it for now
index 9794868f6d5929a4d471f7c47a9371a0b44ad288..8a4b3fad581292c44d24ae2bc45e18e24a70c44d 100644 (file)
@@ -330,7 +330,7 @@ class TestCommandLineArgs(unittest.TestCase):
         self.assertEqual(program.testNames, argv[1:])
 
         # it may be better to use platform specific functions to normalise paths
-        # rather than accepting '.PY' and '\' as file seprator on Linux / Mac
+        # rather than accepting '.PY' and '\' as file separator on Linux / Mac
         # it would also be better to check that a filename is a valid module
         # identifier (we have a regex for this in loader.py)
         # for invalid filenames should we raise a useful error rather than
index f1a6c990598f4d1af5e0087b81d99acf6ca23d72..a8e57295c60c622b7dc38545cfd332a73c0fb5d1 100644 (file)
@@ -836,7 +836,7 @@ class ElementTree:
 
 @contextlib.contextmanager
 def _get_writer(file_or_filename, encoding):
-    # returns text write method and release all resourses after using
+    # returns text write method and release all resources after using
     try:
         write = file_or_filename.write
     except AttributeError: