PyCQA / baron

IDE allow you to refactor code, Baron allows you to write refactoring code.
http://baron.pycqa.org
GNU Lesser General Public License v3.0
289 stars 50 forks source link

v0.9 doesn't support *var expressions in tuples/lists/sets #148

Closed toejough closed 5 years ago

toejough commented 5 years ago

v0.9 release notes mention "add support for *var expressions in tuple assignment", but none of the set/tuple/list items in the following snippet parse:

set_items = {*[1, 2, 3], 5}
tuple_items = (*{1, 2, 3}, 5)
list_items = [*(1, 2, 3), 5]

Those are all valid expressions (in 3.7.2, anyway - I don't remember where the *-expansion was introduced).

Also, the error Baron gives says consider that python does not yet parse python 3 code integrally, and I'm not quite sure how to parse that myself. Should that first "python" be "baron"?

(edited to simplify the snippet further) (edited to diversify the snippet further)

toejough commented 5 years ago

Oh, looks like #137 covers this.