From 906d6ac29151c4e5f69c3f70b7e6aa03af7bc4c9 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Mon, 6 Jul 2020 13:50:06 -0400 Subject: [PATCH] Switch to flake8 as a better way of running pyflakes. --- Makefile | 2 +- newsfragments/3329.other | 0 setup.cfg | 5 +++++ setup.py | 3 ++- tox.ini | 2 +- 5 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 newsfragments/3329.other diff --git a/Makefile b/Makefile index 6e0009ddf..6dd87409e 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ default: PYTHON=python export PYTHON -PYFLAKES=pyflakes +PYFLAKES=flake8 export PYFLAKES SOURCES=src/allmydata static misc setup.py diff --git a/newsfragments/3329.other b/newsfragments/3329.other new file mode 100644 index 000000000..e69de29bb diff --git a/setup.cfg b/setup.cfg index de40c9e23..c2d224225 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,3 +5,8 @@ install = update_version install develop = update_version develop bdist_egg = update_version bdist_egg bdist_wheel = update_version bdist_wheel + +[flake8] +# For now, only use pyflakes errors; flake8 is still helpful because it allows +# ignoring specific errors/warnings when needed. +select = F \ No newline at end of file diff --git a/setup.py b/setup.py index caa37f16e..0d43294cc 100644 --- a/setup.py +++ b/setup.py @@ -353,11 +353,12 @@ setup(name="tahoe-lafs", # also set in __init__.py # discussion. ':sys_platform=="win32"': ["pywin32 != 226"], "test": [ + "flake8", # Pin a specific pyflakes so we don't have different folks # disagreeing on what is or is not a lint issue. We can bump # this version from time to time, but we will do it # intentionally. - "pyflakes == 2.1.0", + "pyflakes == 2.2.0", # coverage 5.0 breaks the integration tests in some opaque way. # This probably needs to be addressed in a more permanent way # eventually... diff --git a/tox.ini b/tox.ini index 3134a0d9f..44b583baa 100644 --- a/tox.ini +++ b/tox.ini @@ -75,7 +75,7 @@ commands = whitelist_externals = /bin/mv commands = - pyflakes src static misc setup.py + flake8 src static misc setup.py python misc/coding_tools/check-umids.py src python misc/coding_tools/check-debugging.py python misc/coding_tools/find-trailing-spaces.py -r src static misc setup.py