We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 21e8180 commit b74eedcCopy full SHA for b74eedc
Lib/traceback.py
@@ -1343,7 +1343,7 @@ def _find_keyword_typos(self):
1343
# If the original code doesn't raise SyntaxError, we can't validate
1344
# that a keyword replacement actually fixes anything
1345
try:
1346
- codeop.compile_command(error_code, symbol="exec")
+ codeop.compile_command(error_code, symbol="exec", flags=codeop.PyCF_ONLY_AST)
1347
except SyntaxError:
1348
pass # Good - the original code has a syntax error we might fix
1349
else:
0 commit comments