mirror of
https://github.com/python/cpython.git
synced 2025-07-19 09:15:34 +00:00
gh-105042: Disable unmatched parens syntax error in python tokenize (#105061)
This commit is contained in:
parent
9216e69a87
commit
70f315c2d6
5 changed files with 49 additions and 34 deletions
|
@ -84,7 +84,7 @@ _tokenizer_error(struct tok_state *tok)
|
|||
msg = "invalid token";
|
||||
break;
|
||||
case E_EOF:
|
||||
if (tok->level) {
|
||||
if (tok->level > 0) {
|
||||
PyErr_Format(PyExc_SyntaxError,
|
||||
"parenthesis '%c' was never closed",
|
||||
tok->parenstack[tok->level-1]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue