summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkihiro Motoki <amotoki@gmail.com>2017-07-08 21:11:49 +0000
committerAkihiro Motoki <amotoki@gmail.com>2017-07-08 23:19:23 +0000
commit28144e9a2f771762103b5e692c5c9d30f095e647 (patch)
tree87ec33f194112f5fbf79d9ad33c939f3ae40320f
parentc15dfe5acd58efa0c5c27dd19de5d4ef2a880c36 (diff)
hacking: Drop import_exceptions from tox.ini
Current hacking check actually does not check attribute-level imports. We can safely drop import_exceptions from tox.ini. Also drops noqa to guard import exceptions from the same reason. Change-Id: I4e37931a7bfb0aa7867d027125ffcf66e414cf08
Notes
Notes (review): Code-Review+2: Rob Cresswell <robert.cresswell@outlook.com> Workflow+1: Rob Cresswell <robert.cresswell@outlook.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Wed, 19 Jul 2017 12:40:02 +0000 Reviewed-on: https://review.openstack.org/481866 Project: openstack/django_openstack_auth Branch: refs/heads/master
-rw-r--r--openstack_auth/backend.py2
-rw-r--r--openstack_auth/forms.py4
-rw-r--r--openstack_auth/models.py5
-rw-r--r--openstack_auth/plugin/__init__.py8
-rw-r--r--openstack_auth/tests/tests.py2
-rw-r--r--openstack_auth/views.py12
-rw-r--r--tox.ini10
7 files changed, 18 insertions, 25 deletions
diff --git a/openstack_auth/backend.py b/openstack_auth/backend.py
index bc1d345..dae603a 100644
--- a/openstack_auth/backend.py
+++ b/openstack_auth/backend.py
@@ -18,7 +18,7 @@ import logging
18import pytz 18import pytz
19 19
20from django.conf import settings 20from django.conf import settings
21from django.utils.module_loading import import_string # noqa 21from django.utils.module_loading import import_string
22from django.utils.translation import ugettext_lazy as _ 22from django.utils.translation import ugettext_lazy as _
23 23
24from openstack_auth import exceptions 24from openstack_auth import exceptions
diff --git a/openstack_auth/forms.py b/openstack_auth/forms.py
index bacc9c0..c7d0c51 100644
--- a/openstack_auth/forms.py
+++ b/openstack_auth/forms.py
@@ -15,11 +15,11 @@ import collections
15import logging 15import logging
16 16
17from django.conf import settings 17from django.conf import settings
18from django.contrib.auth import authenticate # noqa 18from django.contrib.auth import authenticate
19from django.contrib.auth import forms as django_auth_forms 19from django.contrib.auth import forms as django_auth_forms
20from django import forms 20from django import forms
21from django.utils.translation import ugettext_lazy as _ 21from django.utils.translation import ugettext_lazy as _
22from django.views.decorators.debug import sensitive_variables # noqa 22from django.views.decorators.debug import sensitive_variables
23 23
24from openstack_auth import exceptions 24from openstack_auth import exceptions
25from openstack_auth import utils 25from openstack_auth import utils
diff --git a/openstack_auth/models.py b/openstack_auth/models.py
index 76cfc2a..7316aac 100644
--- a/openstack_auth/models.py
+++ b/openstack_auth/models.py
@@ -12,4 +12,7 @@
12# limitations under the License. 12# limitations under the License.
13 13
14# import the User model in here so Django can find it 14# import the User model in here so Django can find it
15from openstack_auth.user import User # noqa 15from openstack_auth.user import User
16
17
18__all__ = ['User']
diff --git a/openstack_auth/plugin/__init__.py b/openstack_auth/plugin/__init__.py
index c664bed..75e5e85 100644
--- a/openstack_auth/plugin/__init__.py
+++ b/openstack_auth/plugin/__init__.py
@@ -10,10 +10,10 @@
10# License for the specific language governing permissions and limitations 10# License for the specific language governing permissions and limitations
11# under the License. 11# under the License.
12 12
13from openstack_auth.plugin.base import * # noqa 13from openstack_auth.plugin.base import BasePlugin
14from openstack_auth.plugin.password import * # noqa 14from openstack_auth.plugin.k2k import K2KAuthPlugin
15from openstack_auth.plugin.token import * # noqa 15from openstack_auth.plugin.password import PasswordPlugin
16from openstack_auth.plugin.k2k import * # noqa 16from openstack_auth.plugin.token import TokenPlugin
17 17
18 18
19__all__ = ['BasePlugin', 19__all__ = ['BasePlugin',
diff --git a/openstack_auth/tests/tests.py b/openstack_auth/tests/tests.py
index 80e5a88..fcd864f 100644
--- a/openstack_auth/tests/tests.py
+++ b/openstack_auth/tests/tests.py
@@ -29,7 +29,7 @@ from keystoneclient.v2_0 import client as client_v2
29from keystoneclient.v3 import client as client_v3 29from keystoneclient.v3 import client as client_v3
30import mock 30import mock
31from mox3 import mox 31from mox3 import mox
32from testscenarios import load_tests_apply_scenarios # noqa 32from testscenarios import load_tests_apply_scenarios
33 33
34from openstack_auth import policy 34from openstack_auth import policy
35from openstack_auth.tests import data_v2 35from openstack_auth.tests import data_v2
diff --git a/openstack_auth/views.py b/openstack_auth/views.py
index e02ff70..7ae3063 100644
--- a/openstack_auth/views.py
+++ b/openstack_auth/views.py
@@ -14,7 +14,7 @@ import logging
14 14
15from django.conf import settings 15from django.conf import settings
16from django.contrib import auth 16from django.contrib import auth
17from django.contrib.auth.decorators import login_required # noqa 17from django.contrib.auth.decorators import login_required
18from django.contrib.auth import views as django_auth_views 18from django.contrib.auth import views as django_auth_views
19from django.contrib import messages 19from django.contrib import messages
20from django import http as django_http 20from django import http as django_http
@@ -22,10 +22,10 @@ from django import shortcuts
22from django.utils import functional 22from django.utils import functional
23from django.utils import http 23from django.utils import http
24from django.utils.translation import ugettext_lazy as _ 24from django.utils.translation import ugettext_lazy as _
25from django.views.decorators.cache import never_cache # noqa 25from django.views.decorators.cache import never_cache
26from django.views.decorators.csrf import csrf_exempt # noqa 26from django.views.decorators.csrf import csrf_exempt
27from django.views.decorators.csrf import csrf_protect # noqa 27from django.views.decorators.csrf import csrf_protect
28from django.views.decorators.debug import sensitive_post_parameters # noqa 28from django.views.decorators.debug import sensitive_post_parameters
29from keystoneauth1 import exceptions as keystone_exceptions 29from keystoneauth1 import exceptions as keystone_exceptions
30import six 30import six
31 31
@@ -36,7 +36,7 @@ from openstack_auth import plugin
36# This is historic and is added back in to not break older versions of 36# This is historic and is added back in to not break older versions of
37# Horizon, fix to Horizon to remove this requirement was committed in 37# Horizon, fix to Horizon to remove this requirement was committed in
38# Juno 38# Juno
39from openstack_auth.forms import Login # noqa 39from openstack_auth.forms import Login # noqa:F401
40from openstack_auth import user as auth_user 40from openstack_auth import user as auth_user
41from openstack_auth import utils 41from openstack_auth import utils
42 42
diff --git a/tox.ini b/tox.ini
index ff65dc5..6e48a2b 100644
--- a/tox.ini
+++ b/tox.ini
@@ -62,13 +62,3 @@ commands = python setup.py build_sphinx
62[flake8] 62[flake8]
63builtins = _ 63builtins = _
64exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py 64exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py
65
66[hacking]
67import_exceptions = django.conf.settings,
68 django.core.urlresolvers.reverse,
69 django.conf.urls.include,
70 django.conf.urls.patterns,
71 django.conf.urls.url,
72 django.utils.translation.pgettext_lazy,
73 django.utils.translation.ugettext_lazy,
74 django.utils.translation.ungettext_lazy,