Add __future__ import style checker

This adds the [flake8-future-import][f] plugin for flake8, which enforces the
standard set of `__future__` imports at the top of all Python files. This
revealed a fair number of files that need to be fixed.

To be revisited after #1887 is merged.

[f]: https://github.com/xZise/flake8-future-import
This commit is contained in:
Adrian Sampson 2016-02-28 15:24:48 -08:00 committed by wordofglass
parent 4691deb5a5
commit 53b5faf7a8
2 changed files with 9 additions and 4 deletions

View file

@ -4,7 +4,11 @@ logging-clear-handlers=1
eval-attr="!=slow"
[flake8]
# E241 missing whitespace after ',' (used to align visually)
# E221 multiple spaces before operator (used to align visually)
# E731 do not assign a lambda expression, use a def
ignore=E241,E221,E731
# Default pyflakes errors we ignore:
# - E241: missing whitespace after ',' (used to align visually)
# - E221: multiple spaces before operator (used to align visually)
# - E731: do not assign a lambda expression, use a def
#
# And for `flake8-future-import`, we define the set of imports we require:
# division, absolute_import, and print_function.
ignore=E241,E221,E731,FI50,FI51,FI12,FI53,FI14,FI15

View file

@ -47,4 +47,5 @@ commands =
[testenv:flake8]
deps =
flake8
flake8-future-import
commands = flake8 beets beetsplug beet test setup.py docs