options mucked up when run as setuptools command
When including options in setup.cfg
such as the following ignore
[flake8]
ignore = E225,E226,W293
running python setup.py flake8
fails. The reason is that the arguments are only partially digested by flake8, and then passed as a kwarg {'ignore': 'E225,E226,W293'}
(from self.options_dict
) to pep8's get_style_guide
. The latter must expect that the ignore=
argument is fully digested as a tuple ignore=('E225', 'E226', 'W293')
as it does not digest further and simply pulls this apart options.ignore = ... tuple(options.ignore)
to obtain the useless set of ignores ('E', '2', '2', '5', ',',...
. (This code is the same in pre 1.6.0 versions and 1.6.2).
I believe this is just another incarnation of issue #4 (closed) for which the fix was specific to a single exclude
option rather than addressing the general issue.
Please either completely digest the options, or somehow let pep8 do it instead (not sure how though). Actually, in retrospect, why are options like ignore specified in the [flake8]
section rather than simply in the [pep8]
section where both pep8 and flake8 could be configured together (for the pep8 related stuff)?