Use ExprStmt pretty much everywhere where it should be used.
ExprStmt is now really a normal statement. All the other statements are from now on considered legacy code. As a side effect this increases the parser pickling version.
This commit is contained in:
1 parent
cb84bc0829
commit
5a3ee02399
6 files changed
+13
-13
No files matched your search
@@ -112,7 +112,7 @@ def _check_module(evaluator, module):
|
||||
except KeyError:
|
||||
return get_sys_path()
|
||||
sys_path = list(get_sys_path()) # copy
|
||||
statements = (p for p in possible_stmts if isinstance(p, pr.Statement))
|
||||
statements = (p for p in possible_stmts if isinstance(p, pr.ExprStmt))
|
||||
for stmt in statements:
|
||||
expressions = stmt.expression_list()
|
||||
if len(expressions) == 1 and isinstance(expressions[0], pr.Call):
|
||||
|
||||
Reference in new issue
Block a user