Closed
Description
Generates incorrect code if unparse passes an assignment with an empty tuple on the left side.
import ast
ast.unparse(ast.parse("() = []")) # " = []"
ast.unparse(ast.parse("[] = () = []")) # "[] = = []"
The simplest solution would be to remove the line
self.set_precedence(_Precedence.TUPLE, target)
in ast._Unparser.visit_Assign
Doesn't work properly in 3.11.0b1, 3.12.0a0
In 3.9.12, 3.10.4 - works correctly