Page MenuHomePhabricator

[Analyzer] Make testing scripts flake8-compliant

Authored by george.karpenkov on Sep 22 2017, 6:49 PM.



Writing and refactoring python code can be scary, due to the fact that it's very easy to miss renaming/missing variables bugs.
For python there's a flake8 tool which catches many of those, and also enforces many PEP8 style conventions (though unfortunately a few of those are opinionated).
Out of interest, I've run and fixed flake8 on our testing folder, and these are the results.
I'm a bit hesitant (although it is trivial to) add a flake8 bots, as fixing those without flake8 support in your editor (e.g. Vim+ALE is a good combination) is time-consuming.
Though if people are keen, I can add a bot as well.

Diff Detail

Event Timeline

zaks.anna added inline comments.Sep 25 2017, 1:03 PM

"to analyzer" -> "to the analyzer", am I right?


I kind like the original version. It's more expressive given that we are dealing with a string.

george.karpenkov marked 2 inline comments as done.
zaks.anna accepted this revision.Sep 29 2017, 10:44 PM
This revision is now accepted and ready to land.Sep 29 2017, 10:44 PM

Misspelled revision/review, committed in r314692, closing manually.