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

Extra \n when parsing classes #165

Open Osso opened 4 years ago

Osso commented 4 years ago

I am getting an extra \n when parsing a class definition:

`In [61]: baron.parse("class C:\n pass")

Out[61]: [{'decorators': [], 'fifth_formatting': [], 'first_formatting': [{'type': 'space', 'value': ' '}], 'fourth_formatting': [], 'inherit_from': [], 'name': 'C', 'parenthesis': False, 'second_formatting': [], 'sixth_formatting': [], 'third_formatting': [], 'type': 'class', 'value': [{'formatting': [], 'indent': ' ', 'type': 'endl', 'value': '\n'}, {'type': 'pass'}, {'formatting': [], 'indent': '', 'type': 'endl', 'value': '\n'}]}] `