https://github.com/python/cpython/commit/2a5d1eb7073179a13159bce937afdbe240432e7d
commit: 2a5d1eb7073179a13159bce937afdbe240432e7d
branch: main
author: Xie Yanbo <[email protected]>
committer: kumaraditya303 <[email protected]>
date: 2024-07-23T14:34:14+05:30
summary:

Fix typos in comments and exception message (#122147)

files:
M Parser/action_helpers.c
M Parser/asdl_c.py
M Parser/pegen_errors.c

diff --git a/Parser/action_helpers.c b/Parser/action_helpers.c
index 0307a0881ef882..db6f872c7224d1 100644
--- a/Parser/action_helpers.c
+++ b/Parser/action_helpers.c
@@ -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 &&
diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py
index e6867f138a5ccb..9fed69b12479d6 100755
--- a/Parser/asdl_c.py
+++ b/Parser/asdl_c.py
@@ -131,7 +131,7 @@ def emit(self, s, depth, reflow=True):
     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
diff --git a/Parser/pegen_errors.c b/Parser/pegen_errors.c
index e8f11a67e50fa0..e94a4923228d0f 100644
--- a/Parser/pegen_errors.c
+++ b/Parser/pegen_errors.c
@@ -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.
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to