Skip to content

Commit 2a5d1eb

Browse files
authored
Fix typos in comments and exception message (#122147)
1 parent 47847aa commit 2a5d1eb

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Parser/action_helpers.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1594,7 +1594,7 @@ _PyPegen_concatenate_strings(Parser *p, asdl_expr_seq *strings,
15941594
for (i = 0; i < n_flattened_elements; i++) {
15951595
expr_ty elem = asdl_seq_GET(flattened, i);
15961596

1597-
/* The concatenation of a FormattedValue and an empty Contant should
1597+
/* The concatenation of a FormattedValue and an empty Constant should
15981598
lead to the FormattedValue itself. Thus, we will not take any empty
15991599
constants into account, just as in `_PyPegen_joined_str` */
16001600
if (f_string_found && elem->kind == Constant_kind &&

Parser/asdl_c.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def emit(self, s, depth, reflow=True):
131131
def metadata(self):
132132
if self._metadata is None:
133133
raise ValueError(
134-
"%s was expecting to be annnotated with metadata"
134+
"%s was expecting to be annotated with metadata"
135135
% type(self).__name__
136136
)
137137
return self._metadata

Parser/pegen_errors.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ _Pypegen_raise_decode_error(Parser *p)
155155
static int
156156
_PyPegen_tokenize_full_source_to_check_for_errors(Parser *p) {
157157
// Tokenize the whole input to see if there are any tokenization
158-
// errors such as mistmatching parentheses. These will get priority
158+
// errors such as mismatching parentheses. These will get priority
159159
// over generic syntax errors only if the line number of the error is
160160
// before the one that we had for the generic error.
161161

0 commit comments

Comments
 (0)