Browse Source

Enabled hacking checks H305 and H307

* H305  imports not grouped correctly
* H307  like imports should be grouped together

Change-Id: I23fdad285508707a2c1d7c832ff8b1a6a10e8f88
Christian Berendt 4 years ago
parent
commit
d51b546774

+ 1
- 0
novaclient/tests/test_auth_plugins.py View File

@@ -14,6 +14,7 @@
14 14
 #    under the License.
15 15
 
16 16
 import argparse
17
+
17 18
 import mock
18 19
 import pkg_resources
19 20
 import requests

+ 3
- 4
novaclient/tests/test_client.py View File

@@ -14,11 +14,12 @@
14 14
 #    under the License.
15 15
 
16 16
 
17
+import json
17 18
 import logging
18
-import mock
19
-import requests
20 19
 
21 20
 import fixtures
21
+import mock
22
+import requests
22 23
 
23 24
 import novaclient.client
24 25
 import novaclient.extension
@@ -27,8 +28,6 @@ from novaclient.tests import utils
27 28
 import novaclient.v1_1.client
28 29
 import novaclient.v3.client
29 30
 
30
-import json
31
-
32 31
 
33 32
 class ClientConnectionPoolTest(utils.TestCase):
34 33
 

+ 3
- 4
novaclient/tests/test_shell.py View File

@@ -11,15 +11,14 @@
11 11
 #    License for the specific language governing permissions and limitations
12 12
 #    under the License.
13 13
 
14
-import prettytable
14
+from distutils.version import StrictVersion
15 15
 import re
16
-import six
17 16
 import sys
18 17
 
19
-from distutils.version import StrictVersion
20
-
21 18
 import fixtures
22 19
 import mock
20
+import prettytable
21
+import six
23 22
 from testtools import matchers
24 23
 
25 24
 import novaclient.client

+ 1
- 2
novaclient/tests/v1_1/contrib/test_baremetal.py View File

@@ -15,10 +15,9 @@
15 15
 
16 16
 
17 17
 from novaclient import extension
18
-from novaclient.v1_1.contrib import baremetal
19
-
20 18
 from novaclient.tests import utils
21 19
 from novaclient.tests.v1_1.contrib import fakes
20
+from novaclient.v1_1.contrib import baremetal
22 21
 
23 22
 
24 23
 extensions = [

+ 2
- 2
novaclient/tests/v1_1/contrib/test_instance_actions.py View File

@@ -12,11 +12,11 @@
12 12
 #    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 13
 #    License for the specific language governing permissions and limitations
14 14
 #    under the License.
15
-from novaclient import extension
16
-from novaclient.v1_1.contrib import instance_action
17 15
 
16
+from novaclient import extension
18 17
 from novaclient.tests import utils
19 18
 from novaclient.tests.v1_1.contrib import fakes
19
+from novaclient.v1_1.contrib import instance_action
20 20
 
21 21
 
22 22
 extensions = [

+ 1
- 2
novaclient/tests/v1_1/contrib/test_list_extensions.py View File

@@ -12,10 +12,9 @@
12 12
 #    under the License.
13 13
 
14 14
 from novaclient import extension
15
-from novaclient.v1_1.contrib import list_extensions
16
-
17 15
 from novaclient.tests import utils
18 16
 from novaclient.tests.v1_1 import fakes
17
+from novaclient.v1_1.contrib import list_extensions
19 18
 
20 19
 
21 20
 extensions = [

+ 1
- 2
novaclient/tests/v1_1/contrib/test_tenant_networks.py View File

@@ -14,10 +14,9 @@
14 14
 #    under the License.
15 15
 
16 16
 from novaclient import extension
17
-from novaclient.v1_1.contrib import tenant_networks
18
-
19 17
 from novaclient.tests import utils
20 18
 from novaclient.tests.v1_1.contrib import fakes
19
+from novaclient.v1_1.contrib import tenant_networks
21 20
 
22 21
 
23 22
 extensions = [

+ 1
- 1
novaclient/utils.py View File

@@ -12,12 +12,12 @@
12 12
 #    under the License.
13 13
 
14 14
 import json
15
-import pkg_resources
16 15
 import re
17 16
 import sys
18 17
 import textwrap
19 18
 import uuid
20 19
 
20
+import pkg_resources
21 21
 import prettytable
22 22
 import six
23 23
 

+ 2
- 2
tox.ini View File

@@ -27,7 +27,7 @@ downloadcache = ~/cache/pip
27 27
 
28 28
 [flake8]
29 29
 # TODO fix following rules from hacking 0.9
30
-# E131,E265,H233,H305,H307,H402,H405,H904
31
-ignore = E12,E131,E265,F811,F821,H233,H302,H305,H307,H402,H404,H405,H904
30
+# E131,E265,H233,H402,H405,H904
31
+ignore = E12,E131,E265,F811,F821,H233,H302,H402,H404,H405,H904
32 32
 show-source = True
33 33
 exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,build

Loading…
Cancel
Save