]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix typos in the Tools directory (GH-28769)
authorChristian Clauss <cclauss@me.com>
Wed, 6 Oct 2021 17:55:16 +0000 (19:55 +0200)
committerGitHub <noreply@github.com>
Wed, 6 Oct 2021 17:55:16 +0000 (10:55 -0700)
Like #28744 but for the Tools directory.

[skip issue] Opening a related issue is pending python/psf-infra-meta#130

Automerge-Triggered-By: GH:pablogsal
15 files changed:
Tools/c-analyzer/c_analyzer/__main__.py
Tools/c-analyzer/c_analyzer/info.py
Tools/c-analyzer/c_common/logging.py
Tools/c-analyzer/c_common/strutil.py
Tools/c-analyzer/c_parser/info.py
Tools/c-analyzer/c_parser/parser/__init__.py
Tools/c-analyzer/c_parser/preprocessor/__init__.py
Tools/c-analyzer/cpython/__main__.py
Tools/c-analyzer/cpython/ignored.tsv
Tools/peg_generator/pegen/c_generator.py
Tools/peg_generator/pegen/first_sets.py
Tools/peg_generator/scripts/download_pypi_packages.py
Tools/pynche/ColorDB.py
Tools/scripts/dutree.doc
Tools/scripts/stable_abi.py

index 24fc6cd182656bedd3cdff35c84794a4bbe7bc2f..5d89b29adf899e46ac491d13126d5f560f7473bd 100644 (file)
@@ -482,7 +482,7 @@ COMMANDS = {
         cmd_analyze,
     ),
     'data': (
-        'check/manage local data (e.g. knwon types, ignored vars, caches)',
+        'check/manage local data (e.g. known types, ignored vars, caches)',
         [_cli_data],
         cmd_data,
     ),
index b75918e5e7a68744eea736dacf9589ff699df235..27c3a5a4ee76f2990760c243d1cc3956dac64fac 100644 (file)
@@ -230,11 +230,11 @@ class Analyzed:
         return self
 
     def as_rowdata(self, columns=None):
-        # XXX finsih!
+        # XXX finish!
         return self.item.as_rowdata(columns)
 
     def render_rowdata(self, columns=None):
-        # XXX finsih!
+        # XXX finish!
         return self.item.render_rowdata(columns)
 
     def render(self, fmt='line', *, itemonly=False):
index 12398f7e385fdbc98ad625c6249a29eb4faa47c3..10af852ec3c5e618602478918a61af86ac27fa05 100644 (file)
@@ -41,7 +41,7 @@ def configure_logger(logger, verbosity=VERBOSITY, *,
 def hide_emit_errors():
     """Ignore errors while emitting log entries.
 
-    Rather than printing a message desribing the error, we show nothing.
+    Rather than printing a message describing the error, we show nothing.
     """
     # For now we simply ignore all exceptions.  If we wanted to ignore
     # specific ones (e.g. BrokenPipeError) then we would need to use
index e7535d45bbba23d7c37c82321deff5994b0c5588..07193c091e4c3f515ae2a24abb42945d6731cc53 100644 (file)
@@ -26,7 +26,7 @@ def parse_entries(entries, *, ignoresep=None):
                     # We read the entire file here to ensure the file
                     # gets closed sooner rather than later.  Note that
                     # the file would stay open if this iterator is never
-                    # exchausted.
+                    # exhausted.
                     lines = infile.read().splitlines()
                 for line in _iter_significant_lines(lines):
                     yield line, filename
index 98ff511cfe64a025fb251909788247606e8e3253..697b1f26dc21519974315a51a50a21029287b1d5 100644 (file)
@@ -1029,7 +1029,7 @@ class Function(Declaration):
 
     @classmethod
     def _raw_data(self, data):
-        # XXX finsh!
+        # XXX finish!
         return data
 
     @classmethod
@@ -1255,7 +1255,7 @@ class Enum(TypeDeclaration):
 
     @classmethod
     def _raw_data(self, data):
-        # XXX finsih!
+        # XXX finish!
         return data
 
     @classmethod
@@ -1296,12 +1296,12 @@ class Statement(HighlevelParsedItem):
 
     @classmethod
     def _resolve_data(cls, data):
-        # XXX finsih!
+        # XXX finish!
         return data, None
 
     @classmethod
     def _raw_data(self, data):
-        # XXX finsih!
+        # XXX finish!
         return data
 
     @classmethod
index 39056099f5e918a8268ab1fdda1a1c13db4faae1..df70aae66b77606247d898c95dba025e417f936b 100644 (file)
@@ -7,7 +7,7 @@ valid C code.
 
 Furthermore, the grammar rules for the C syntax (particularly as
 described in the K&R book) actually describe a superset, of which the
-full C langage is a proper subset.  Here are some of the extra
+full C language is a proper subset.  Here are some of the extra
 conditions that must be applied when parsing C code:
 
 * ...
@@ -90,7 +90,7 @@ Here are the cases where we've taken shortcuts or made assumptions:
 * no "inline" type declarations (struct, union, enum) in function
   parameters ~(including function pointers)~
 * no "inline" type decls in function return types
-* no superflous parentheses in declarators
+* no superfluous parentheses in declarators
 * var decls in for loops are always "simple" (e.g. no inline types)
 * only inline struct/union/enum decls may be anonymouns (without a name)
 * no function pointers in function pointer parameters
index 8da4d8cadf7d0eecc32819457ecdd4815cf2613f..e38176fee31fac7bee0b3c20681f0a24c1943cff 100644 (file)
@@ -19,7 +19,7 @@ from . import (
 logger = logging.getLogger(__name__)
 
 
-# Supprted "source":
+# Supported "source":
 #  * filename (string)
 #  * lines (iterable)
 #  * text (string)
@@ -156,7 +156,7 @@ def handling_errors(ignore_exc=None, *, log_err=None):
 # tools
 
 _COMPILERS = {
-    # matching disutils.ccompiler.compiler_class:
+    # matching distutils.ccompiler.compiler_class:
     'unix': _gcc.preprocess,
     'msvc': None,
     'cygwin': None,
index a11b687214d2f473f9cc5b5561b5b3ef186465cc..06ec871ba75e35df24861a6f948b6bb0476268bf 100644 (file)
@@ -342,7 +342,7 @@ COMMANDS = {
         cmd_parse,
     ),
     'data': (
-        'check/manage local data (e.g. knwon types, ignored vars, caches)',
+        'check/manage local data (e.g. known types, ignored vars, caches)',
         [_cli_data],
         cmd_data,
     ),
index 302f10cb2bc466de889ac21c87bdd2a71faba8cb..f3fdf3b0d05d92199305d1fb3c69c3fab5867157 100644 (file)
@@ -2106,7 +2106,7 @@ Python/import.c   import_find_and_load    header  -
 #-----------------------
 # runtime state
 
-# (look at the bottome of the file)
+# (look at the bottom of the file)
 
 #-----------------------
 # modules
index d15e91098dfe9cff5a9e831285dfe811bfd467e2..29c310fa76b1765bacc18957a5811d09ec59dd6a 100644 (file)
@@ -737,7 +737,7 @@ class CParserGenerator(ParserGenerator, GrammarVisitor):
             self.print(
                 f'D(fprintf(stderr, "%*c+ {rulename}[%d-%d]: %s succeeded!\\n", p->level, \' \', _mark, p->mark, "{node_str}"));'
             )
-            # Prepare to emmit the rule action and do so
+            # Prepare to emit the rule action and do so
             if node.action and "EXTRA" in node.action:
                 self._set_up_token_end_metadata_extraction()
             if self.skip_actions:
index 611ef514d09bdae34bb2bf5c05594be25f8d9e0e..6d794ffa4bfa8b50add799ccd961737659f8f5d9 100755 (executable)
@@ -56,7 +56,7 @@ class FirstSetCalculator(GrammarVisitor):
                 result -= to_remove
 
             # If the set of new terminals can start with the empty string,
-            # it means that the item is completelly nullable and we should
+            # it means that the item is completely nullable and we should
             # also considering at least the next item in case the current
             # one fails to parse.
 
index 0af876c3ecad4d1b50da7168c139f29b583bb6ad..180309d0bce628f8a3d378cd0549a28233f552d6 100755 (executable)
@@ -73,7 +73,7 @@ def main() -> None:
 
         package_json = load_json(package_name)
         try:
-            print(f"Dowloading and compressing package {package_name} ... ", end="")
+            print(f"Downloading and compressing package {package_name} ... ", end="")
             download_package_code(package_name, package_json)
             print("Done")
         except (IndexError, KeyError):
index eb76d4042d33b6c7e0e83eabebf3363fd7e12d4d..c013a60896908963c279f3a36e1e94d7b42fcacf 100644 (file)
@@ -9,7 +9,7 @@ format of the file is.  If it can't figure out the file format, or it has
 trouble reading the file, None is returned.  You can pass get_colordb() an
 optional filetype argument.
 
-Supporte file types are:
+Supported file types are:
 
     X_RGB_TXT -- X Consortium rgb.txt format files.  Three columns of numbers
                  from 0 .. 255 separated by whitespace.  Arbitrary trailing
index 97bd2e2e47cae9403b810cf4fd6f3e7025d55186..490126b0182d1c0476c2b2f0c4120e56a839f589 100644 (file)
@@ -15,7 +15,7 @@ From the keyboard of flee@cs.psu.edu (Felix Lee):
 :And Perl is definitely awkward with data types.  I haven't yet found a
 :pleasant way of shoving non-trivial data types into Perl's grammar.
 
-Yes, it's pretty aweful at that, alright.  Sometimes I write perl programs
+Yes, it's pretty awful at that, alright.  Sometimes I write perl programs
 that need them, and sometimes it just takes a little creativity.  But
 sometimes it's not worth it.  I actually wrote a C program the other day
 (gasp) because I didn't want to deal with a game matrix with six links per node.
index b7fd2c8583ba70f829839c9517bf5b6b8f6382c6..6d7034090f8819480d3c4ab0d62dd952954cf378 100755 (executable)
@@ -67,7 +67,7 @@ class Manifest:
     def add(self, item):
         if item.name in self.contents:
             # We assume that stable ABI items do not share names,
-            # even if they're diferent kinds (e.g. function vs. macro).
+            # even if they're different kinds (e.g. function vs. macro).
             raise ValueError(f'duplicate ABI item {item.name}')
         self.contents[item.name] = item
 
@@ -295,7 +295,7 @@ def do_unixy_check(manifest, args):
     present_macros = gcc_get_limited_api_macros(['Include/Python.h'])
     feature_defines = manifest.feature_defines & present_macros
 
-    # Check that we have all neded macros
+    # Check that we have all needed macros
     expected_macros = set(
         item.name for item in manifest.select({'macro'})
     )
@@ -412,7 +412,7 @@ def binutils_check_library(manifest, library, expected_symbols, dynamic):
 def gcc_get_limited_api_macros(headers):
     """Get all limited API macros from headers.
 
-    Runs the preprocesor over all the header files in "Include" setting
+    Runs the preprocessor over all the header files in "Include" setting
     "-DPy_LIMITED_API" to the correct value for the running version of the
     interpreter and extracting all macro definitions (via adding -dM to the
     compiler arguments).
@@ -449,7 +449,7 @@ def gcc_get_limited_api_macros(headers):
 def gcc_get_limited_api_definitions(headers):
     """Get all limited API definitions from headers.
 
-    Run the preprocesor over all the header files in "Include" setting
+    Run the preprocessor over all the header files in "Include" setting
     "-DPy_LIMITED_API" to the correct value for the running version of the
     interpreter.