[PATCH 6/6] trivial: Stop universally disabling F405 check

Stephen Finucane stephen at that.guru
Thu Sep 30 20:55:18 AEST 2021


We only need this for one file. Simply filter out the things we want to
ignore.

Signed-off-by: Stephen Finucane <stephen at that.guru>
---
 patchwork/settings/dev.py | 6 ++++--
 tox.ini                   | 3 +--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git patchwork/settings/dev.py patchwork/settings/dev.py
index aa3ee3c5..2b7fc954 100644
--- patchwork/settings/dev.py
+++ patchwork/settings/dev.py
@@ -7,6 +7,8 @@ Design based on:
     http://www.revsys.com/blog/2014/nov/21/recommended-django-project-layout/
 """
 
+import os
+
 from .base import *  # noqa
 
 try:
@@ -77,7 +79,7 @@ PASSWORD_HASHERS = ['django.contrib.auth.hashers.MD5PasswordHasher']
 # django-debug-toolbar
 
 if debug_toolbar:
-    INSTALLED_APPS += [
+    INSTALLED_APPS += [  # noqa: F405
         'debug_toolbar'
     ]
 
@@ -86,7 +88,7 @@ if debug_toolbar:
 # This should go first in the middleware classes
     MIDDLEWARE = [
         'debug_toolbar.middleware.DebugToolbarMiddleware',
-    ] + MIDDLEWARE
+    ] + MIDDLEWARE  # noqa: F405
 
     INTERNAL_IPS = [
         '127.0.0.1', '::1',
diff --git tox.ini tox.ini
index 1de53ac3..494e9fb5 100644
--- tox.ini
+++ tox.ini
@@ -47,9 +47,8 @@ commands = flake8 {posargs:patchwork manage.py}
 # Some rules are ignored as their use makes the code more difficult to read:
 #
 # E129 visually indented line with same indent as next logical line
-# F405 'name' may be undefined, or defined from star imports: 'module'
 # W504 line break after binary operator
-ignore = E129, F405, W504
+ignore = E129, W504
 
 [testenv:docs]
 deps =
-- 
2.31.1



More information about the Patchwork mailing list