pycodestyle
pycodestyle copied to clipboard
Prevent confusion with unintentional traling commas
There is the common programmer mistake to leave a trailing comma on a value, that leads that value unexpectedly treated as a tuple [1] [2]
PEP8 guide already warn on this https://www.python.org/dev/peps/pep-0008/#when-to-use-trailing-commas
Yes:
FILES = ('setup.cfg',)
OK, but confusing:
FILES = 'setup.cfg',
What you think about to allow pycodestyle tool to produce a warning message in that case?
Pylint has that check since 1.7 version