diff --git a/rewrite/rewrite/python/_parser_visitor.py b/rewrite/rewrite/python/_parser_visitor.py index 70bcc80..8c3979c 100644 --- a/rewrite/rewrite/python/_parser_visitor.py +++ b/rewrite/rewrite/python/_parser_visitor.py @@ -420,12 +420,11 @@ def visit_List(self, node): Markers.EMPTY ) self.__skip(']') - return j.NewArray( + return py.CollectionLiteral( random_id(), prefix, Markers.EMPTY, - None, - [], + py.CollectionLiteral.Kind.LIST, elements, self.__map_type(node) )