Update pyflakes for new tool support and fixes to parsing.

Review Request #11556 — Created March 26, 2021 and submitted — Latest diff uploaded

Information

ReviewBot
release-3.0.x

Reviewers

This updates PyflakesTool to subclass the newer BaseTool, and to use
the newer features it offers (dependencies, centralized base command
building, and standardized error code/column output).

It also fixes some mistakes from my prior pyflakes change. It turns out
pyflakes has some inconsistencies with a colon found in the generated
output, and this led to issues with parsing some of the output.

On top of this, execute()'s return_errors combined with
split_lines didn't do the right thing when using with_errors=True
(the default). That's been corrected to give return_errors precedence.

These were caught by the new integration tests, which are also added in
this change.

All unit tests pass on Python 2.x and 3.x.

Diff Revision 1 (Latest)

Commits

First Last Summary ID Author
Update pyflakes for new tool support and fixes to parsing.
This updates `PyflakesTool` to subclass the newer `BaseTool`, and to use the newer features it offers (dependencies, centralized base command building, and standardized error code/column output). It also fixes some mistakes from my prior pyflakes change. It turns out pyflakes has some inconsistencies with a colon found in the generated output, and this led to issues with parsing some of the output. On top of this, `execute()`'s `return_errors` combined with `split_lines` didn't do the right thing when using `with_errors=True` (the default). That's been corrected to give `return_errors` precedence. These were caught by the new integration tests, which are also added in this change.
65d3a0861351013c8e31d3c6b65c3c49a54b5a22 Christian Hammond
bot/reviewbot/tools/pyflakes.py
bot/reviewbot/tools/tests/test_pyflakes.py
bot/reviewbot/utils/process.py
Loading...