Fix H306 imports not in alphabetical order
Remove the following rules from ignore list without any violations from these: H201,H302,H303,H701,H702,H803 A part of blueprint openstack-hacking-compliant Change-Id: I4e43e13234f7640ef216db168d873c4cc1198328
This commit is contained in:
parent
32871fee1f
commit
41fc94754f
@ -13,10 +13,10 @@
|
||||
|
||||
import logging
|
||||
|
||||
from django import forms
|
||||
from django.conf import settings
|
||||
from django.contrib.auth import authenticate
|
||||
from django.contrib.auth.forms import AuthenticationForm
|
||||
from django import forms
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.views.decorators.debug import sensitive_variables
|
||||
|
||||
|
@ -15,10 +15,10 @@ import copy
|
||||
|
||||
import mox
|
||||
|
||||
from django import test
|
||||
from django.conf import settings
|
||||
from django.contrib.auth import REDIRECT_FIELD_NAME
|
||||
from django.core.urlresolvers import reverse
|
||||
from django import test
|
||||
|
||||
from keystoneclient import exceptions as keystone_exceptions
|
||||
from keystoneclient.v2_0 import client as client_v2
|
||||
|
@ -14,8 +14,8 @@
|
||||
import hashlib
|
||||
import logging
|
||||
|
||||
from django.contrib.auth.models import AnonymousUser
|
||||
from django.conf import settings
|
||||
from django.contrib.auth.models import AnonymousUser
|
||||
|
||||
from keystoneclient import exceptions as keystone_exceptions
|
||||
|
||||
|
@ -15,8 +15,8 @@ from six.moves.urllib import parse as urlparse
|
||||
|
||||
from django.conf import settings
|
||||
from django.contrib import auth
|
||||
from django.contrib.auth.models import AnonymousUser
|
||||
from django.contrib.auth import middleware
|
||||
from django.contrib.auth.models import AnonymousUser
|
||||
from django.utils import timezone
|
||||
|
||||
from keystoneclient.v2_0 import client as client_v2
|
||||
|
@ -14,24 +14,24 @@
|
||||
import logging
|
||||
|
||||
import django
|
||||
from django import shortcuts
|
||||
from django.conf import settings
|
||||
from django.contrib.auth import REDIRECT_FIELD_NAME
|
||||
from django.contrib.auth.views import (login as django_login,
|
||||
logout_then_login as django_logout)
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from django.views.decorators.debug import sensitive_post_parameters
|
||||
from django.contrib.auth import REDIRECT_FIELD_NAME
|
||||
from django.contrib.auth.views import login as django_login
|
||||
from django.contrib.auth.views import logout_then_login as django_logout
|
||||
from django import shortcuts
|
||||
from django.utils.functional import curry
|
||||
from django.views.decorators.cache import never_cache
|
||||
from django.views.decorators.csrf import csrf_protect
|
||||
from django.views.decorators.debug import sensitive_post_parameters
|
||||
|
||||
try:
|
||||
from django.utils.http import is_safe_url
|
||||
except ImportError:
|
||||
from .utils import is_safe_url
|
||||
|
||||
from keystoneclient.v2_0 import client as keystone_client_v2
|
||||
from keystoneclient import exceptions as keystone_exceptions
|
||||
from keystoneclient.v2_0 import client as keystone_client_v2
|
||||
|
||||
from .forms import Login
|
||||
from .user import set_session_from_user, create_user_from_token, Token
|
||||
|
8
tox.ini
8
tox.ini
@ -36,11 +36,7 @@ downloadcache = ~/cache/pip
|
||||
[flake8]
|
||||
builtins = _
|
||||
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py
|
||||
# H201 no 'except:' at least use 'except Exception:'
|
||||
# H302 import only modules.'from optparse import make_option' does not import a module
|
||||
# H303 No wildcard (*) import.
|
||||
# H301 one import per line
|
||||
# H304 No relative imports. 'from .views import IndexView' is a relative import
|
||||
# H4xx docstrings
|
||||
# H701 empty localization string
|
||||
# H702 Formatting operation should be outside of localization method call
|
||||
ignore = H201,H301,H306,H302,H303,H304,H4,H701,H702,H803
|
||||
ignore = H301,H304,H4
|
||||
|
Loading…
Reference in New Issue
Block a user