With a large number of errors, filenames, and per-file-ignores the style guide
selection would take a significant portion of execution time
(python3 70% / python2 99.9%).
Caching the styleguide lookup by filename eliminates this bottleneck.
Use of extras_require produces correct package metadata for flake8
regardless of the version of Python the package is built with.
The conditional code produces different metadata for Python 3 and 2.
The latest versions of flake8 were released with Python 3 and metadata
did not contain two dependencies necessary for use with Python 2.7.
See https://gitlab.com/pycqa/flake8/issues/341 for details.
Account for users of setuptools<18 that still need the conditional code.
When attempting to centralize all inline NoQA handling in the StyleGuide
we inadvertently broke plugins relying on it in combination with checker
state. For example, the check for E402 relies both on NoQA and the state
to determine if it has seen a non-import line. Placing NoQA on the sole
line that is not an import is more elegant than placing it on each of
the following import lines.
Closes#186
Fundamentally on Flake8 2.x using -q altered the format of the errors
(and the behaviour a little) so it makes the most sense to implement
this logic with formatters rather than messy logic spread throughout
the project.
The FilenameOnly formatter will keep track of filenames already reported
and only print the name once while Nothing will print nothing.
Closes#180
This proved simpler because I realized something important: Most of the
code that the old integration was using was in fact doing nothing of
value. Since we can't meaningfully allow users to use command-line
options as parameters to `python setup.py flake8`, we just remove the
work that we do to set up those attributes and parse them.