From: Stephen Finucane Date: Wed, 29 Sep 2021 16:38:11 +0000 (+0100) Subject: trivial: Stop universally disabling F405 check X-Git-Tag: v3.1.0~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=580cc8570a05c1bcfe48123d6e012637135f1c7e;p=thirdparty%2Fpatchwork.git trivial: Stop universally disabling F405 check We only need this for one file. Simply filter out the things we want to ignore. Signed-off-by: Stephen Finucane --- diff --git a/patchwork/settings/dev.py b/patchwork/settings/dev.py index aa3ee3c5..2b7fc954 100644 --- a/patchwork/settings/dev.py +++ b/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 a/tox.ini b/tox.ini index 1de53ac3..494e9fb5 100644 --- a/tox.ini +++ b/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 =