Browse Source

Merge "hacking: Drop import_exceptions from tox.ini"

Jenkins 1 year ago
parent
commit
c6c8982fc1

+ 1
- 1
openstack_auth/backend.py View File

@@ -18,7 +18,7 @@ import logging
18 18
 import pytz
19 19
 
20 20
 from django.conf import settings
21
-from django.utils.module_loading import import_string  # noqa
21
+from django.utils.module_loading import import_string
22 22
 from django.utils.translation import ugettext_lazy as _
23 23
 
24 24
 from openstack_auth import exceptions

+ 2
- 2
openstack_auth/forms.py View File

@@ -15,11 +15,11 @@ import collections
15 15
 import logging
16 16
 
17 17
 from django.conf import settings
18
-from django.contrib.auth import authenticate  # noqa
18
+from django.contrib.auth import authenticate
19 19
 from django.contrib.auth import forms as django_auth_forms
20 20
 from django import forms
21 21
 from django.utils.translation import ugettext_lazy as _
22
-from django.views.decorators.debug import sensitive_variables  # noqa
22
+from django.views.decorators.debug import sensitive_variables
23 23
 
24 24
 from openstack_auth import exceptions
25 25
 from openstack_auth import utils

+ 4
- 1
openstack_auth/models.py View File

@@ -12,4 +12,7 @@
12 12
 # limitations under the License.
13 13
 
14 14
 # import the User model in here so Django can find it
15
-from openstack_auth.user import User        # noqa
15
+from openstack_auth.user import User
16
+
17
+
18
+__all__ = ['User']

+ 4
- 4
openstack_auth/plugin/__init__.py View File

@@ -10,10 +10,10 @@
10 10
 # License for the specific language governing permissions and limitations
11 11
 # under the License.
12 12
 
13
-from openstack_auth.plugin.base import *  # noqa
14
-from openstack_auth.plugin.password import *  # noqa
15
-from openstack_auth.plugin.token import *  # noqa
16
-from openstack_auth.plugin.k2k import *  # noqa
13
+from openstack_auth.plugin.base import BasePlugin
14
+from openstack_auth.plugin.k2k import K2KAuthPlugin
15
+from openstack_auth.plugin.password import PasswordPlugin
16
+from openstack_auth.plugin.token import TokenPlugin
17 17
 
18 18
 
19 19
 __all__ = ['BasePlugin',

+ 1
- 1
openstack_auth/tests/tests.py View File

@@ -29,7 +29,7 @@ from keystoneclient.v2_0 import client as client_v2
29 29
 from keystoneclient.v3 import client as client_v3
30 30
 import mock
31 31
 from mox3 import mox
32
-from testscenarios import load_tests_apply_scenarios  # noqa
32
+from testscenarios import load_tests_apply_scenarios
33 33
 
34 34
 from openstack_auth import policy
35 35
 from openstack_auth.tests import data_v2

+ 6
- 6
openstack_auth/views.py View File

@@ -14,7 +14,7 @@ import logging
14 14
 
15 15
 from django.conf import settings
16 16
 from django.contrib import auth
17
-from django.contrib.auth.decorators import login_required  # noqa
17
+from django.contrib.auth.decorators import login_required
18 18
 from django.contrib.auth import views as django_auth_views
19 19
 from django.contrib import messages
20 20
 from django import http as django_http
@@ -22,10 +22,10 @@ from django import shortcuts
22 22
 from django.utils import functional
23 23
 from django.utils import http
24 24
 from django.utils.translation import ugettext_lazy as _
25
-from django.views.decorators.cache import never_cache  # noqa
26
-from django.views.decorators.csrf import csrf_exempt  # noqa
27
-from django.views.decorators.csrf import csrf_protect  # noqa
28
-from django.views.decorators.debug import sensitive_post_parameters  # noqa
25
+from django.views.decorators.cache import never_cache
26
+from django.views.decorators.csrf import csrf_exempt
27
+from django.views.decorators.csrf import csrf_protect
28
+from django.views.decorators.debug import sensitive_post_parameters
29 29
 from keystoneauth1 import exceptions as keystone_exceptions
30 30
 import six
31 31
 
@@ -36,7 +36,7 @@ from openstack_auth import plugin
36 36
 # This is historic and is added back in to not break older versions of
37 37
 # Horizon, fix to Horizon to remove this requirement was committed in
38 38
 # Juno
39
-from openstack_auth.forms import Login  # noqa
39
+from openstack_auth.forms import Login  # noqa:F401
40 40
 from openstack_auth import user as auth_user
41 41
 from openstack_auth import utils
42 42
 

+ 0
- 10
tox.ini View File

@@ -62,13 +62,3 @@ commands = python setup.py build_sphinx
62 62
 [flake8]
63 63
 builtins = _
64 64
 exclude =  .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py
65
-
66
-[hacking]
67
-import_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,

Loading…
Cancel
Save