]> granicus.if.org Git - python/commitdiff
Issue #22186: Fix typos in Lib/.
authorBerker Peksag <berker.peksag@gmail.com>
Sun, 19 Oct 2014 15:04:38 +0000 (18:04 +0300)
committerBerker Peksag <berker.peksag@gmail.com>
Sun, 19 Oct 2014 15:04:38 +0000 (18:04 +0300)
Patch by FĂ©vry Thibault.

12 files changed:
Lib/idlelib/idle_test/htest.py
Lib/idlelib/idle_test/mock_tk.py
Lib/idlelib/idle_test/test_autoexpand.py
Lib/inspect.py
Lib/ipaddress.py
Lib/lib2to3/tests/test_parser.py
Lib/pdb.py
Lib/poplib.py
Lib/ssl.py
Lib/test/test_asyncio/test_base_events.py
Lib/unittest/test/test_case.py
Tools/clinic/clinic.py

index d673fe4ea82beaf8828d4c8db336812935ee2a6e..1fe5ad4a5167e6fdd0cff48957c7acf4f5709958 100644 (file)
@@ -171,7 +171,7 @@ GetKeysDialog_spec = {
            "<nothing> is invalid.\n"
            "No modifier key is invalid.\n"
            "Shift key with [a-z],[0-9], function key, move key, tab, space"
-           "is invalid.\nNo validitity checking if advanced key binding "
+           "is invalid.\nNo validity checking if advanced key binding "
            "entry is used."
     }
 
index b9fd5216b93a130df643c91317bd879b40d3d37b..a8030f4f5ca4d6949961b46e82e956bf5bd44485 100644 (file)
@@ -116,7 +116,7 @@ class Text:
         """Return a (line, char) tuple of int indexes into self.data.
 
         This implements .index without converting the result back to a string.
-        The result is contrained by the number of lines and linelengths of
+        The result is constrained by the number of lines and linelengths of
         self.data. For many indexes, the result is initially (1, 0).
 
         The input index may have any of several possible forms:
index 7f112a0025ddc60a90210618ff9fd69378b43c93..7ca941ec29024cab9ea288547a34d730f8ee12b5 100644 (file)
@@ -78,7 +78,7 @@ class AutoExpandTest(unittest.TestCase):
         equal(previous(), 'a')
 
     def test_after_only(self):
-        # Also add punctuation 'noise' that shoud be ignored.
+        # Also add punctuation 'noise' that should be ignored.
         text = self.text
         previous = self.auto_expand.getprevword
         expand = self.auto_expand.expand_word_event
index f6e1b4789f1c14bfbe0de83a0c77bec864dc457a..530f2402b8b98b520f5ac18b9c16984128319e11 100644 (file)
@@ -49,7 +49,7 @@ from collections import namedtuple, OrderedDict
 
 # Create constants for the compiler flags in Include/code.h
 # We try to get them from dis to avoid duplication, but fall
-# back to hardcoding so the dependency is optional
+# back to hard-coding so the dependency is optional
 try:
     from dis import COMPILER_FLAG_NAMES as _flag_names
 except ImportError:
index 54df39ae5622019bd14504731f3c866f3d27ed24..ebc04bb145833081888b9bb6a73046886a4d967e 100644 (file)
@@ -472,7 +472,7 @@ class _IPAddressBase(_TotalOrderingMixin):
         """Return prefix length from the bitwise netmask.
 
         Args:
-            ip_int: An integer, the netmask in axpanded bitwise format
+            ip_int: An integer, the netmask in expanded bitwise format
 
         Returns:
             An integer, the prefix length.
index b64469ced6eb4eee9fba1a8d93c317f56ea60f63..5bb9d2becb71f537a21d191b1bc0e52b4691afb6 100644 (file)
@@ -90,7 +90,7 @@ class TestRaiseChanges(GrammarTest):
         self.invalid_syntax("raise E from")
 
 
-# Adaptated from Python 3's Lib/test/test_grammar.py:GrammarTests.testFuncdef
+# Adapted 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 42e605e682a5695f1aa30ac9d0cccf238e09da1d..e28564bdfa3bcd4b9f9385e54d6fae9287343532 100755 (executable)
@@ -301,7 +301,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
         # An 'Internal StopIteration' exception is an exception debug event
         # issued by the interpreter when handling a subgenerator run with
         # 'yield from' or a generator controled by a for loop. No exception has
-        # actually occured in this case. The debugger uses this debug event to
+        # actually occurred in this case. The debugger uses this debug event to
         # stop when the debuggee is returning from such generators.
         prefix = 'Internal ' if (not exc_traceback
                                     and exc_type is StopIteration) else ''
index 23a3517e98350c84238d24f5811dc90d36e871e1..2b0e3d54156999dc76e3d96897090a2cc4a1fe25 100644 (file)
@@ -41,7 +41,7 @@ LF = b'\n'
 CRLF = CR+LF
 
 # maximal line length when calling readline(). This is to prevent
-# reading arbitrary lenght lines. RFC 1939 limits POP3 line length to
+# reading arbitrary length lines. RFC 1939 limits POP3 line length to
 # 512 characters, including CRLF. We have selected 2048 just to be on
 # the safe side.
 _MAXLINE = 2048
index d9d191628cd15e98ba2f1059f745d6f82731bd8f..e2636eff4c91cc45e43b45b0d5e00d62ffc665aa 100644 (file)
@@ -213,7 +213,7 @@ def _dnsname_match(dn, hostname, max_wildcards=1):
     wildcards = leftmost.count('*')
     if wildcards > max_wildcards:
         # Issue #17980: avoid denials of service by refusing more
-        # than one wildcard per fragment.  A survery of established
+        # than one wildcard per fragment.  A survey of established
         # policy among SSL implementations showed it to be a
         # reasonable choice.
         raise CertificateError(
index afc448c0da8e5ccb08770aff47f9901784ccd0af..d61a64c9a383234397f7f75fdd75366642bcc633 100644 (file)
@@ -371,7 +371,7 @@ class BaseEventLoopTests(test_utils.TestCase):
             self.loop.run_until_complete, self.loop.subprocess_exec,
             asyncio.SubprocessProtocol)
 
-        # exepected multiple arguments, not a list
+        # expected multiple arguments, not a list
         self.assertRaises(TypeError,
             self.loop.run_until_complete, self.loop.subprocess_exec,
             asyncio.SubprocessProtocol, args)
index e70dd5bd03ba776dc114da9007853840d12d0bcb..f0b327dd82677564be0f2dcdf0fcd0a7f6f66d8d 100644 (file)
@@ -1349,7 +1349,7 @@ test case
         self.checkAssertLogsPerLevel('ERROR')
 
     def checkAssertLogsPerLogger(self, logger):
-        # Check per-logger fitering
+        # Check per-logger filtering
         with self.assertNoStderr():
             with self.assertLogs(level='DEBUG') as outer_cm:
                 with self.assertLogs(logger, level='DEBUG') as cm:
index 93e8f5a6b9ada8197aa63d2d109f0cf1124ff648..65bad5174cc09cd30d9c51915081aa003515f9ab 100755 (executable)
@@ -1015,7 +1015,7 @@ class CLanguage(Language):
         # when we're METH_O, but have a custom return converter,
         # we use "impl_parameters" for the parsing function
         # because that works better.  but that means we must
-        # supress actually declaring the impl's parameters
+        # suppress actually declaring the impl's parameters
         # as variables in the parsing function.  but since it's
         # METH_O, we have exactly one anyway, so we know exactly
         # where it is.
@@ -3727,7 +3727,7 @@ class DSLParser:
             if self.keyword_only:
                 fail("Function " + self.function.name + " mixes keyword-only and positional-only parameters, which is unsupported.")
             self.parameter_state = self.ps_seen_slash
-            # fixup preceeding parameters
+            # fixup preceding parameters
             for p in self.function.parameters.values():
                 if (p.kind != inspect.Parameter.POSITIONAL_OR_KEYWORD and not isinstance(p.converter, self_converter)):
                     fail("Function " + self.function.name + " mixes keyword-only and positional-only parameters, which is unsupported.")
@@ -3923,7 +3923,7 @@ class DSLParser:
                 # for __init__.  (it can't be, __init__ doesn't
                 # have a docstring.)  if this is an __init__
                 # (or __new__), then this signature is for
-                # calling the class to contruct a new instance.
+                # calling the class to construct a new instance.
                 p_add('$')
 
             name = p.converter.signature_name or p.name