Skip to content

Commit

Permalink
Also use CollectionLiteral for lists
Browse files Browse the repository at this point in the history
  • Loading branch information
knutwannheden committed Aug 22, 2024
1 parent 05b95f8 commit dbf9b5d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions rewrite/rewrite/python/_parser_visitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
Expand Down

0 comments on commit dbf9b5d

Please sign in to comment.