File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -1212,6 +1212,7 @@ def build_ast(
12121212 is_lambda = False ,
12131213 noneInNames = False ,
12141214 is_top_level_module = False ,
1215+ compile_mode = "exec" ,
12151216 ) -> GenericASTTraversal :
12161217 # FIXME: DRY with fragments.py
12171218
@@ -1262,7 +1263,6 @@ def build_ast(
12621263 load_const .kind == "LOAD_CONST"
12631264 and load_const .linestart is None
12641265 and load_const .attr is None
1265- or is_top_level_module
12661266 ):
12671267 # Delete LOAD_CONST (None) RETURN_VALUE
12681268 del tokens [- 2 :]
@@ -1371,6 +1371,7 @@ def code_deparse(
13711371 co ,
13721372 is_lambda = is_lambda_mode (compile_mode ),
13731373 is_top_level_module = is_top_level_module ,
1374+ compile_mode = compile_mode ,
13741375 )
13751376
13761377 # XXX workaround for profiling
You can’t perform that action at this time.
0 commit comments