Update flake8 for new tool support and more reliable output parsing.
Review Request #11558 — Created March 27, 2021 and submitted — Latest diff uploaded
This updates
Flake8Tool
to subclass the newerBaseTool
, and to
use the newer features it offers (dependencies, improved centralized
base command building, and standardized error code/column output).The reporting actually parses the CodeClimate format. Flake8 supports
plugins for reporters, and one of them,flake8-json
, offers
CodeClimate output. This is a format that many other tools support, so
it makes sense to use it wherever possible. A new utility function has
been added to convert these payloads into comments.We unconditionally depend on
flake8-json
for the CodeClimate support,
even ifflake8
itself isn't installed. This is a small dependency, and
ensures we don't need to worry about having users install yet one more
thing.
Unit tests pass on Python 2.7 and 3.x.