Bug report
Bug description:
import ast
print(repr(ast.parse("x")))
Current vs expected:
-Module(body=[Expr(value=Name(id='x', ctx=Load(...)))], type_ignores=[])
+Module(body=[Expr(value=Name(id='x', ctx=Load()))], type_ignores=[])
If a node is empty, let's avoid adding ... that could suggest that there's something redacted within the node.
Thanks @asottile for reporting internally. I didn't find a duplicate.
CPython versions tested on:
CPython main branch, 3.15, 3.14
Operating systems tested on:
No response
Linked PRs
Bug report
Bug description:
Current vs expected:
If a node is empty, let's avoid adding
...that could suggest that there's something redacted within the node.Thanks @asottile for reporting internally. I didn't find a duplicate.
CPython versions tested on:
CPython main branch, 3.15, 3.14
Operating systems tested on:
No response
Linked PRs
...for empty AST node representations #156022