Skip to content

Commit 76e20c3

Browse files
authored
gh-106989: Remove tok report warnings (#106993)
1 parent adda43d commit 76e20c3

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

Parser/tokenizer.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ tok_new(void)
116116
tok->implicit_newline = 0;
117117
tok->tok_mode_stack[0] = (tokenizer_mode){.kind =TOK_REGULAR_MODE, .f_string_quote='\0', .f_string_quote_size = 0, .f_string_debug=0};
118118
tok->tok_mode_stack_index = 0;
119-
tok->tok_report_warnings = 1;
120119
#ifdef Py_DEBUG
121120
tok->debug = _Py_GetConfig()->parser_debug;
122121
#endif
@@ -1545,10 +1544,6 @@ static int
15451544
warn_invalid_escape_sequence(struct tok_state *tok, int first_invalid_escape_char)
15461545
{
15471546

1548-
if (!tok->tok_report_warnings) {
1549-
return 0;
1550-
}
1551-
15521547
PyObject *msg = PyUnicode_FromFormat(
15531548
"invalid escape sequence '\\%c'",
15541549
(char) first_invalid_escape_char

Parser/tokenizer.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ struct tok_state {
128128
// TODO: Factor this into its own thing
129129
tokenizer_mode tok_mode_stack[MAXFSTRINGLEVEL];
130130
int tok_mode_stack_index;
131-
int tok_report_warnings;
132131
int tok_extra_tokens;
133132
int comment_newline;
134133
int implicit_newline;

0 commit comments

Comments
 (0)