Menu

#1442 Code formatter conflicts with PEP8 E261

open
nobody
None
5
2011-12-16
2011-12-16
Anonymous
No

When a line ending with a comma (for example, when each entry in a dict or a list is on its own line) is followed by an inline comment and the code formatter is enabled, the line is always changed to put a single (or none, depending on the configuration) whitespace between the comma and the comment. This contradicts the PEP8 rule E261 "at least two spaces before inline comment" and creates a warning if PEP8 is enabled.

When there's an inline comment, the code formatter should put two whitespaces after the comma.

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.