Zac-HD / shed

`shed` canonicalises Python code. Shed your legacy, stop bikeshedding, and move on. Black++
https://pypi.org/project/shed/
GNU Affero General Public License v3.0
342 stars 23 forks source link

Stop `shed --refactor` from removing comments in otherwise-pointless parens #68

Closed Zac-HD closed 1 year ago

Zac-HD commented 1 year ago

See these commits; the problem is that it removes the whitespace (which includes comments) too. Should just be one new condition in remove_pointless_parens_around_call(); "if node contains comment node: return node without changes" which can be copied from remove_trailing_comma().