Skip to content

Commit 707c37e

Browse files
authored
Fix typos in variable names, function names, and comments (GH-101868)
1 parent 467e3f9 commit 707c37e

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

Lib/zipimport.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ def _read_directory(archive):
352352

353353
with fp:
354354
# GH-87235: On macOS all file descriptors for /dev/fd/N share the same
355-
# file offset, reset the file offset after scanning the zipfile diretory
355+
# file offset, reset the file offset after scanning the zipfile directory
356356
# to not cause problems when some runs 'python3 /dev/fd/9 9<some_script'
357357
start_offset = fp.tell()
358358
try:

Mac/BuildScript/build-installer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1492,7 +1492,7 @@ def packageFromRecipe(targetDir, recipe):
14921492
IFPkgFlagRelocatable=False,
14931493
IFPkgFlagRestartAction="NoRestart",
14941494
IFPkgFlagRootVolumeOnly=True,
1495-
IFPkgFlagUpdateInstalledLangauges=False,
1495+
IFPkgFlagUpdateInstalledLanguages=False,
14961496
)
14971497
writePlist(pl, os.path.join(packageContents, 'Info.plist'))
14981498

PC/launcher2.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ typedef struct {
438438
bool list;
439439
// if true, only list detected runtimes with paths without launching
440440
bool listPaths;
441-
// if true, display help message before contiuning
441+
// if true, display help message before continuing
442442
bool help;
443443
// if set, limits search to registry keys with the specified Company
444444
// This is intended for debugging and testing only

Parser/pegen_errors.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ _PyPegen_raise_error_known_location(Parser *p, PyObject *errtype,
402402

403403
void
404404
_Pypegen_set_syntax_error(Parser* p, Token* last_token) {
405-
// Existing sintax error
405+
// Existing syntax error
406406
if (PyErr_Occurred()) {
407407
// Prioritize tokenizer errors to custom syntax errors raised
408408
// on the second phase only if the errors come from the parser.

Tools/build/stable_abi.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ def gcc_get_limited_api_macros(headers):
521521

522522
api_hexversion = sys.version_info.major << 24 | sys.version_info.minor << 16
523523

524-
preprocesor_output_with_macros = subprocess.check_output(
524+
preprocessor_output_with_macros = subprocess.check_output(
525525
sysconfig.get_config_var("CC").split()
526526
+ [
527527
# Prevent the expansion of the exported macros so we can
@@ -540,7 +540,7 @@ def gcc_get_limited_api_macros(headers):
540540
return {
541541
target
542542
for target in re.findall(
543-
r"#define (\w+)", preprocesor_output_with_macros
543+
r"#define (\w+)", preprocessor_output_with_macros
544544
)
545545
}
546546

@@ -561,7 +561,7 @@ def gcc_get_limited_api_definitions(headers):
561561
Requires Python built with a GCC-compatible compiler. (clang might work)
562562
"""
563563
api_hexversion = sys.version_info.major << 24 | sys.version_info.minor << 16
564-
preprocesor_output = subprocess.check_output(
564+
preprocessor_output = subprocess.check_output(
565565
sysconfig.get_config_var("CC").split()
566566
+ [
567567
# Prevent the expansion of the exported macros so we can capture
@@ -581,13 +581,13 @@ def gcc_get_limited_api_definitions(headers):
581581
stderr=subprocess.DEVNULL,
582582
)
583583
stable_functions = set(
584-
re.findall(r"__PyAPI_FUNC\(.*?\)\s*(.*?)\s*\(", preprocesor_output)
584+
re.findall(r"__PyAPI_FUNC\(.*?\)\s*(.*?)\s*\(", preprocessor_output)
585585
)
586586
stable_exported_data = set(
587-
re.findall(r"__EXPORT_DATA\((.*?)\)", preprocesor_output)
587+
re.findall(r"__EXPORT_DATA\((.*?)\)", preprocessor_output)
588588
)
589589
stable_data = set(
590-
re.findall(r"__PyAPI_DATA\(.*?\)[\s\*\(]*([^);]*)\)?.*;", preprocesor_output)
590+
re.findall(r"__PyAPI_DATA\(.*?\)[\s\*\(]*([^);]*)\)?.*;", preprocessor_output)
591591
)
592592
return stable_data | stable_exported_data | stable_functions
593593

Tools/c-analyzer/c_analyzer/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919

2020
def analyze(filenmes, **kwargs):
21-
results = iter_analyis_results(filenames, **kwargs)
21+
results = iter_analysis_results(filenames, **kwargs)
2222
return Analysis.from_results(results)
2323

2424

Tools/clinic/clinic.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ def flush() -> None:
406406
flush()
407407
return tuple(version)
408408

409-
def version_comparitor(version1: str, version2: str) -> Literal[-1, 0, 1]:
409+
def version_comparator(version1: str, version2: str) -> Literal[-1, 0, 1]:
410410
iterator = itertools.zip_longest(
411411
version_splitter(version1), version_splitter(version2), fillvalue=0
412412
)
@@ -5203,7 +5203,7 @@ def reset(self) -> None:
52035203

52045204
def directive_version(self, required: str) -> None:
52055205
global version
5206-
if version_comparitor(version, required) < 0:
5206+
if version_comparator(version, required) < 0:
52075207
fail("Insufficient Clinic version!\n"
52085208
f" Version: {version}\n"
52095209
f" Required: {required}")

0 commit comments

Comments
 (0)