]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix typos in variable names, function names, and comments (GH-101868)
authorYang Hau <vulxj0j8j8@gmail.com>
Fri, 1 Dec 2023 09:37:40 +0000 (17:37 +0800)
committerGitHub <noreply@github.com>
Fri, 1 Dec 2023 09:37:40 +0000 (09:37 +0000)
Lib/zipimport.py
Mac/BuildScript/build-installer.py
PC/launcher2.c
Parser/pegen_errors.c
Tools/build/stable_abi.py
Tools/c-analyzer/c_analyzer/__init__.py
Tools/clinic/clinic.py

index 5b9f614f02f7af01de9a183e8d81e209ef8e0039..823a82ee830465f48c3b2f15f1069a42bdc444ce 100644 (file)
@@ -352,7 +352,7 @@ def _read_directory(archive):
 
     with fp:
         # GH-87235: On macOS all file descriptors for /dev/fd/N share the same
-        # file offset, reset the file offset after scanning the zipfile diretory
+        # file offset, reset the file offset after scanning the zipfile directory
         # to not cause problems when some runs 'python3 /dev/fd/9 9<some_script'
         start_offset = fp.tell()
         try:
index b35789a7e3132befe53041dcdb41cf7e5070b5d7..938c895c784f3394cb608099e648460bfbc9d02d 100755 (executable)
@@ -1492,7 +1492,7 @@ def packageFromRecipe(targetDir, recipe):
                 IFPkgFlagRelocatable=False,
                 IFPkgFlagRestartAction="NoRestart",
                 IFPkgFlagRootVolumeOnly=True,
-                IFPkgFlagUpdateInstalledLangauges=False,
+                IFPkgFlagUpdateInstalledLanguages=False,
             )
         writePlist(pl, os.path.join(packageContents, 'Info.plist'))
 
index 116091f01227b84bab4367023ede8d25d7f23dc2..2a8f8a101fc8a618f1bfea76a7750c4858d5776e 100644 (file)
@@ -438,7 +438,7 @@ typedef struct {
     bool list;
     // if true, only list detected runtimes with paths without launching
     bool listPaths;
-    // if true, display help message before contiuning
+    // if true, display help message before continuing
     bool help;
     // if set, limits search to registry keys with the specified Company
     // This is intended for debugging and testing only
index 20232f3a26a2cc241b08dbc7a03bd7d0e6e65708..8a02aab1f4e504c2d69cb896e14eab329a2286f4 100644 (file)
@@ -402,7 +402,7 @@ error:
 
 void
 _Pypegen_set_syntax_error(Parser* p, Token* last_token) {
-    // Existing sintax error
+    // Existing syntax error
     if (PyErr_Occurred()) {
         // Prioritize tokenizer errors to custom syntax errors raised
         // on the second phase only if the errors come from the parser.
index 7cba788ff335781380e96a174a009602b086e3d3..85c437d521a15ad293b97a64c7d1f6d66335ccf2 100644 (file)
@@ -521,7 +521,7 @@ def gcc_get_limited_api_macros(headers):
 
     api_hexversion = sys.version_info.major << 24 | sys.version_info.minor << 16
 
-    preprocesor_output_with_macros = subprocess.check_output(
+    preprocessor_output_with_macros = subprocess.check_output(
         sysconfig.get_config_var("CC").split()
         + [
             # Prevent the expansion of the exported macros so we can
@@ -540,7 +540,7 @@ def gcc_get_limited_api_macros(headers):
     return {
         target
         for target in re.findall(
-            r"#define (\w+)", preprocesor_output_with_macros
+            r"#define (\w+)", preprocessor_output_with_macros
         )
     }
 
@@ -561,7 +561,7 @@ def gcc_get_limited_api_definitions(headers):
     Requires Python built with a GCC-compatible compiler. (clang might work)
     """
     api_hexversion = sys.version_info.major << 24 | sys.version_info.minor << 16
-    preprocesor_output = subprocess.check_output(
+    preprocessor_output = subprocess.check_output(
         sysconfig.get_config_var("CC").split()
         + [
             # Prevent the expansion of the exported macros so we can capture
@@ -581,13 +581,13 @@ def gcc_get_limited_api_definitions(headers):
         stderr=subprocess.DEVNULL,
     )
     stable_functions = set(
-        re.findall(r"__PyAPI_FUNC\(.*?\)\s*(.*?)\s*\(", preprocesor_output)
+        re.findall(r"__PyAPI_FUNC\(.*?\)\s*(.*?)\s*\(", preprocessor_output)
     )
     stable_exported_data = set(
-        re.findall(r"__EXPORT_DATA\((.*?)\)", preprocesor_output)
+        re.findall(r"__EXPORT_DATA\((.*?)\)", preprocessor_output)
     )
     stable_data = set(
-        re.findall(r"__PyAPI_DATA\(.*?\)[\s\*\(]*([^);]*)\)?.*;", preprocesor_output)
+        re.findall(r"__PyAPI_DATA\(.*?\)[\s\*\(]*([^);]*)\)?.*;", preprocessor_output)
     )
     return stable_data | stable_exported_data | stable_functions
 
index 171fa25102bffcdc5ecb20dfa1d31b42d84d3b08..b83ffc087a08d83ea886859e2bfb259ab9e6af29 100644 (file)
@@ -18,7 +18,7 @@ from .info import Analysis
 
 
 def analyze(filenmes, **kwargs):
-    results = iter_analyis_results(filenames, **kwargs)
+    results = iter_analysis_results(filenames, **kwargs)
     return Analysis.from_results(results)
 
 
index 54962c9e1c92f96c39f590d27bdd27cd7c598328..6c76f66a81abd42a5c09e0f65b0e1e5e46e2ef58 100755 (executable)
@@ -406,7 +406,7 @@ def version_splitter(s: str) -> tuple[int, ...]:
     flush()
     return tuple(version)
 
-def version_comparitor(version1: str, version2: str) -> Literal[-1, 0, 1]:
+def version_comparator(version1: str, version2: str) -> Literal[-1, 0, 1]:
     iterator = itertools.zip_longest(
         version_splitter(version1), version_splitter(version2), fillvalue=0
     )
@@ -5203,7 +5203,7 @@ class DSLParser:
 
     def directive_version(self, required: str) -> None:
         global version
-        if version_comparitor(version, required) < 0:
+        if version_comparator(version, required) < 0:
             fail("Insufficient Clinic version!\n"
                  f"  Version: {version}\n"
                  f"  Required: {required}")