There are quite a few things to cleanup before having a stable API:
Remove ASTNode.literal_eval() since the caching is making some test fail.
Remove ASTNode.infer() to only use astuce.inference.infer()
Make inference.infer_sequence() private API
Remove inference._infer_Expr() since Expr is a statement, not an expression, it does not make sens to have explicit support for it. If some have to infer the Expr they should call inference.infer(expr_node.value)
Move all public API to the top level astuce module.
Move helpers.nodes_of_class() to nodes.nodes_of_class()
Move ASTNode.has_base() to nodes._has_base()
Also move the ASTNode.unparse() to parser.unparse() and remove caching
Try to narrow down the ASTNode interface a bit more
Move all code in _astutils.py to nodes.py, make fix_missing_parents() private API (just show fix_ast())
There are quite a few things to cleanup before having a stable API:
RemoveASTNode.literal_eval()
since the caching is making some test fail.ASTNode.infer()
to only useastuce.inference.infer()
Makeinference.infer_sequence()
private APIinference._infer_Expr()
sinceExpr
is a statement, not an expression, it does not make sens to have explicit support for it. If some have to infer theExpr
they should callinference.infer(expr_node.value)
astuce
module.Movehelpers.nodes_of_class()
tonodes.nodes_of_class()
Move ASTNode.has_base() to nodes._has_base()Move all code in _astutils.py to nodes.py, make fix_missing_parents() private API (just show fix_ast())Move are_exclusive() to nodes.pyMake filter_statements.py a private module.