]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix typos in comments and exception message (#122147)
authorXie Yanbo <xieyanbo@gmail.com>
Tue, 23 Jul 2024 09:04:14 +0000 (17:04 +0800)
committerGitHub <noreply@github.com>
Tue, 23 Jul 2024 09:04:14 +0000 (14:34 +0530)
Parser/action_helpers.c
Parser/asdl_c.py
Parser/pegen_errors.c

index 0307a0881ef882ae75932417c698981030a6cead..db6f872c7224d122ea068764b1406cca2cca83b3 100644 (file)
@@ -1594,7 +1594,7 @@ _PyPegen_concatenate_strings(Parser *p, asdl_expr_seq *strings,
     for (i = 0; i < n_flattened_elements; i++) {
         expr_ty elem = asdl_seq_GET(flattened, i);
 
-        /* The concatenation of a FormattedValue and an empty Contant should
+        /* The concatenation of a FormattedValue and an empty Constant should
            lead to the FormattedValue itself. Thus, we will not take any empty
            constants into account, just as in `_PyPegen_joined_str` */
         if (f_string_found && elem->kind == Constant_kind &&
index e6867f138a5ccb8cf7b0dd9edc1a4820c9ac1bbb..9fed69b12479d6cd1a2c25883cb2e936b70b4225 100755 (executable)
@@ -131,7 +131,7 @@ class EmitVisitor(asdl.VisitorBase):
     def metadata(self):
         if self._metadata is None:
             raise ValueError(
-                "%s was expecting to be annnotated with metadata"
+                "%s was expecting to be annotated with metadata"
                 % type(self).__name__
             )
         return self._metadata
index e8f11a67e50fa0a99d8f37f4db6170b36a53c8ce..e94a4923228d0f6aa6643ca7a5c51dd95bee4e4e 100644 (file)
@@ -155,7 +155,7 @@ _Pypegen_raise_decode_error(Parser *p)
 static int
 _PyPegen_tokenize_full_source_to_check_for_errors(Parser *p) {
     // Tokenize the whole input to see if there are any tokenization
-    // errors such as mistmatching parentheses. These will get priority
+    // errors such as mismatching parentheses. These will get priority
     // over generic syntax errors only if the line number of the error is
     // before the one that we had for the generic error.