Update flake8 for new tool support and more reliable output parsing.

Review Request #11558 — Created March 27, 2021 and submitted

Information

ReviewBot
release-3.0.x

Reviewers

This updates Flake8Tool to subclass the newer BaseTool, 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 if flake8 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.

Summary ID
Update flake8 for new tool support and more reliable output parsing.
This updates `Flake8Tool` to subclass the newer `BaseTool`, 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 if `flake8` 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.
1219dfb47d38b28e2fe81d7bad5d1f26d803b020
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.0.x (9b2a812)