Skip to content

Commit b74eedc

Browse files
authored
Update Lib/traceback.py
1 parent 21e8180 commit b74eedc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/traceback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1343,7 +1343,7 @@ def _find_keyword_typos(self):
13431343
# If the original code doesn't raise SyntaxError, we can't validate
13441344
# that a keyword replacement actually fixes anything
13451345
try:
1346-
codeop.compile_command(error_code, symbol="exec")
1346+
codeop.compile_command(error_code, symbol="exec", flags=codeop.PyCF_ONLY_AST)
13471347
except SyntaxError:
13481348
pass # Good - the original code has a syntax error we might fix
13491349
else:

0 commit comments

Comments
 (0)