Skip to content

Commit 682aecf

Browse files
authored
Fix typos in the Tools directory (GH-28769)
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
1 parent 0571b93 commit 682aecf

File tree

15 files changed

+24
-24
lines changed

15 files changed

+24
-24
lines changed

Tools/c-analyzer/c_analyzer/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ def cmd_data(datacmd, filenames, known=None, *,
482482
cmd_analyze,
483483
),
484484
'data': (
485-
'check/manage local data (e.g. knwon types, ignored vars, caches)',
485+
'check/manage local data (e.g. known types, ignored vars, caches)',
486486
[_cli_data],
487487
cmd_data,
488488
),

Tools/c-analyzer/c_analyzer/info.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,11 @@ def fix_filename(self, relroot=fsutil.USE_CWD, **kwargs):
230230
return self
231231

232232
def as_rowdata(self, columns=None):
233-
# XXX finsih!
233+
# XXX finish!
234234
return self.item.as_rowdata(columns)
235235

236236
def render_rowdata(self, columns=None):
237-
# XXX finsih!
237+
# XXX finish!
238238
return self.item.render_rowdata(columns)
239239

240240
def render(self, fmt='line', *, itemonly=False):

Tools/c-analyzer/c_common/logging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def configure_logger(logger, verbosity=VERBOSITY, *,
4141
def hide_emit_errors():
4242
"""Ignore errors while emitting log entries.
4343
44-
Rather than printing a message desribing the error, we show nothing.
44+
Rather than printing a message describing the error, we show nothing.
4545
"""
4646
# For now we simply ignore all exceptions. If we wanted to ignore
4747
# specific ones (e.g. BrokenPipeError) then we would need to use

Tools/c-analyzer/c_common/strutil.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def parse_entries(entries, *, ignoresep=None):
2626
# We read the entire file here to ensure the file
2727
# gets closed sooner rather than later. Note that
2828
# the file would stay open if this iterator is never
29-
# exchausted.
29+
# exhausted.
3030
lines = infile.read().splitlines()
3131
for line in _iter_significant_lines(lines):
3232
yield line, filename

Tools/c-analyzer/c_parser/info.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,7 @@ def _resolve_data(cls, data):
10291029

10301030
@classmethod
10311031
def _raw_data(self, data):
1032-
# XXX finsh!
1032+
# XXX finish!
10331033
return data
10341034

10351035
@classmethod
@@ -1255,7 +1255,7 @@ def _resolve_data(cls, data):
12551255

12561256
@classmethod
12571257
def _raw_data(self, data):
1258-
# XXX finsih!
1258+
# XXX finish!
12591259
return data
12601260

12611261
@classmethod
@@ -1296,12 +1296,12 @@ class Statement(HighlevelParsedItem):
12961296

12971297
@classmethod
12981298
def _resolve_data(cls, data):
1299-
# XXX finsih!
1299+
# XXX finish!
13001300
return data, None
13011301

13021302
@classmethod
13031303
def _raw_data(self, data):
1304-
# XXX finsih!
1304+
# XXX finish!
13051305
return data
13061306

13071307
@classmethod

Tools/c-analyzer/c_parser/parser/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
88
Furthermore, the grammar rules for the C syntax (particularly as
99
described in the K&R book) actually describe a superset, of which the
10-
full C langage is a proper subset. Here are some of the extra
10+
full C language is a proper subset. Here are some of the extra
1111
conditions that must be applied when parsing C code:
1212
1313
* ...
@@ -90,7 +90,7 @@
9090
* no "inline" type declarations (struct, union, enum) in function
9191
parameters ~(including function pointers)~
9292
* no "inline" type decls in function return types
93-
* no superflous parentheses in declarators
93+
* no superfluous parentheses in declarators
9494
* var decls in for loops are always "simple" (e.g. no inline types)
9595
* only inline struct/union/enum decls may be anonymouns (without a name)
9696
* no function pointers in function pointer parameters

Tools/c-analyzer/c_parser/preprocessor/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
logger = logging.getLogger(__name__)
2020

2121

22-
# Supprted "source":
22+
# Supported "source":
2323
# * filename (string)
2424
# * lines (iterable)
2525
# * text (string)
@@ -156,7 +156,7 @@ def handling_errors(ignore_exc=None, *, log_err=None):
156156
# tools
157157

158158
_COMPILERS = {
159-
# matching disutils.ccompiler.compiler_class:
159+
# matching distutils.ccompiler.compiler_class:
160160
'unix': _gcc.preprocess,
161161
'msvc': None,
162162
'cygwin': None,

Tools/c-analyzer/cpython/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ def cmd_capi(filenames=None, *,
342342
cmd_parse,
343343
),
344344
'data': (
345-
'check/manage local data (e.g. knwon types, ignored vars, caches)',
345+
'check/manage local data (e.g. known types, ignored vars, caches)',
346346
[_cli_data],
347347
cmd_data,
348348
),

Tools/c-analyzer/cpython/ignored.tsv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2106,7 +2106,7 @@ Python/import.c import_find_and_load header -
21062106
#-----------------------
21072107
# runtime state
21082108

2109-
# (look at the bottome of the file)
2109+
# (look at the bottom of the file)
21102110

21112111
#-----------------------
21122112
# modules

Tools/peg_generator/pegen/c_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ def handle_alt_normal(self, node: Alt, is_gather: bool, rulename: Optional[str])
737737
self.print(
738738
f'D(fprintf(stderr, "%*c+ {rulename}[%d-%d]: %s succeeded!\\n", p->level, \' \', _mark, p->mark, "{node_str}"));'
739739
)
740-
# Prepare to emmit the rule action and do so
740+
# Prepare to emit the rule action and do so
741741
if node.action and "EXTRA" in node.action:
742742
self._set_up_token_end_metadata_extraction()
743743
if self.skip_actions:

Tools/peg_generator/pegen/first_sets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def visit_Alt(self, item: Alt) -> Set[str]:
5656
result -= to_remove
5757

5858
# If the set of new terminals can start with the empty string,
59-
# it means that the item is completelly nullable and we should
59+
# it means that the item is completely nullable and we should
6060
# also considering at least the next item in case the current
6161
# one fails to parse.
6262

Tools/peg_generator/scripts/download_pypi_packages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def main() -> None:
7373

7474
package_json = load_json(package_name)
7575
try:
76-
print(f"Dowloading and compressing package {package_name} ... ", end="")
76+
print(f"Downloading and compressing package {package_name} ... ", end="")
7777
download_package_code(package_name, package_json)
7878
print("Done")
7979
except (IndexError, KeyError):

Tools/pynche/ColorDB.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
trouble reading the file, None is returned. You can pass get_colordb() an
1010
optional filetype argument.
1111
12-
Supporte file types are:
12+
Supported file types are:
1313
1414
X_RGB_TXT -- X Consortium rgb.txt format files. Three columns of numbers
1515
from 0 .. 255 separated by whitespace. Arbitrary trailing

Tools/scripts/dutree.doc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ From the keyboard of [email protected] (Felix Lee):
1515
:And Perl is definitely awkward with data types. I haven't yet found a
1616
:pleasant way of shoving non-trivial data types into Perl's grammar.
1717

18-
Yes, it's pretty aweful at that, alright. Sometimes I write perl programs
18+
Yes, it's pretty awful at that, alright. Sometimes I write perl programs
1919
that need them, and sometimes it just takes a little creativity. But
2020
sometimes it's not worth it. I actually wrote a C program the other day
2121
(gasp) because I didn't want to deal with a game matrix with six links per node.

Tools/scripts/stable_abi.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class Manifest:
6767
def add(self, item):
6868
if item.name in self.contents:
6969
# We assume that stable ABI items do not share names,
70-
# even if they're diferent kinds (e.g. function vs. macro).
70+
# even if they're different kinds (e.g. function vs. macro).
7171
raise ValueError(f'duplicate ABI item {item.name}')
7272
self.contents[item.name] = item
7373

@@ -295,7 +295,7 @@ def do_unixy_check(manifest, args):
295295
present_macros = gcc_get_limited_api_macros(['Include/Python.h'])
296296
feature_defines = manifest.feature_defines & present_macros
297297

298-
# Check that we have all neded macros
298+
# Check that we have all needed macros
299299
expected_macros = set(
300300
item.name for item in manifest.select({'macro'})
301301
)
@@ -412,7 +412,7 @@ def binutils_check_library(manifest, library, expected_symbols, dynamic):
412412
def gcc_get_limited_api_macros(headers):
413413
"""Get all limited API macros from headers.
414414
415-
Runs the preprocesor over all the header files in "Include" setting
415+
Runs the preprocessor over all the header files in "Include" setting
416416
"-DPy_LIMITED_API" to the correct value for the running version of the
417417
interpreter and extracting all macro definitions (via adding -dM to the
418418
compiler arguments).
@@ -449,7 +449,7 @@ def gcc_get_limited_api_macros(headers):
449449
def gcc_get_limited_api_definitions(headers):
450450
"""Get all limited API definitions from headers.
451451
452-
Run the preprocesor over all the header files in "Include" setting
452+
Run the preprocessor over all the header files in "Include" setting
453453
"-DPy_LIMITED_API" to the correct value for the running version of the
454454
interpreter.
455455

0 commit comments

Comments
 (0)