From 96137fe04396d3c82de48bd7840fbcbd7b1e6f65 Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Mon, 27 Dec 2021 14:10:16 -0500
Subject: [PATCH] switch to flake8 to be able to suppress warnings

there will be tons of pyflakes warnings from the python3 porting strategy
---
 setup.cfg | 7 +++++++
 tests.nix | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/setup.cfg b/setup.cfg
index 6d39a54..65fd066 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -63,3 +63,10 @@ versionfile_source = src/_zkapauthorizer/_version.py
 versionfile_build = _zkapauthorizer/_version.py
 tag_prefix = release-
 parentdir_prefix = ZKAPAuthorizer
+
+[flake8]
+# Enforce all pyflakes constraints, and also prohibit tabs for indentation.
+# Reference:
+#   https://flake8.pycqa.org/en/latest/user/error-codes.html
+#   https://pycodestyle.pycqa.org/en/latest/intro.html#error-codes
+select = F, W191
diff --git a/tests.nix b/tests.nix
index 40412a7..f51d572 100644
--- a/tests.nix
+++ b/tests.nix
@@ -51,9 +51,9 @@ let
       mkdir -p $out
 
       pushd ${zkapauthorizer.src}
-      ${python}/bin/pyflakes src
       ${lint-python}/bin/black --check src
       ${lint-python}/bin/isort --check src
+      ${lint-python}/bin/flake8 src
       popd
 
       ZKAPAUTHORIZER_HYPOTHESIS_PROFILE=${hypothesisProfile'} ${python}/bin/python -m ${if collectCoverage
-- 
GitLab