Browse Source

Clean up removed hacking rule from [flake8] ignore lists

We bump hacking>=0.10.0, and hacking removed some rules, for
the full list of rules please see [1]. So don't need them any more.

Hacking related commits:
Remove H904 in commit b1fe19ebeb
Add H105 using author tags
Add H238 hacking no old style class
Add H501 hacking no locals
[1]https://github.com/openstack-dev/hacking/blob/master/setup.cfg#L30

Change-Id: I6a1f3c3ef22be0962ffb81a5da5660837552e5d7
tags/2.0.0.0b2
LiuNanke 3 years ago
parent
commit
85082c5782

+ 1
- 1
manila/api/views/versions.py View File

@@ -63,4 +63,4 @@ class ViewBuilder(object):
63 63
 
64 64
     def _get_base_url_without_version(self):
65 65
         """Get the base URL with out the /v1 suffix."""
66
-        return re.sub('v[1-9]+/?$', '', self.base_url)
66
+        return re.sub('v[1-9]+/?$', '', self.base_url)

+ 1
- 1
manila/share/drivers/netapp/dataontap/protocols/base.py View File

@@ -50,4 +50,4 @@ class NetAppBaseHelper(object):
50 50
 
51 51
     @abc.abstractmethod
52 52
     def get_share_name_for_share(self, share):
53
-        """Returns the flexvol name that hosts a share."""
53
+        """Returns the flexvol name that hosts a share."""

+ 1
- 1
manila/tests/api/openstack/test_versioned_method.py View File

@@ -33,4 +33,4 @@ class VersionedMethodTestCase(test.TestCase):
33 33
         method = versioned_method.VersionedMethod(
34 34
             'fake_name', 'fake_start_version', 'fake_end_version', False,
35 35
             'fake_func')
36
-        self.assertEqual('fake_start_version', method._cmpkey())
36
+        self.assertEqual('fake_start_version', method._cmpkey())

+ 1
- 1
manila/tests/api/test_versions.py View File

@@ -221,4 +221,4 @@ class ExperimentalAPITestCase(test.TestCase):
221 221
         response = self.req.get_response(self.app)
222 222
 
223 223
         self.assertEqual(404, response.status_int)
224
-        self.assertTrue(response.headers.get(experimental_header_name))
224
+        self.assertTrue(response.headers.get(experimental_header_name))

+ 1
- 1
manila/tests/api/v2/test_share_types.py View File

@@ -678,4 +678,4 @@ class ShareTypeAccessTest(test.TestCase):
678 678
 
679 679
         self.assertRaises(webob.exc.HTTPNotFound,
680 680
                           self.controller._remove_project_access,
681
-                          req, '777', body)
681
+                          req, '777', body)

+ 1
- 1
manila/tests/api/views/test_versions.py View File

@@ -152,4 +152,4 @@ class ViewBuilderTestCase(test.TestCase):
152 152
 
153 153
         result = builder._get_base_url_without_version()
154 154
 
155
-        self.assertEqual(base_url_no_version, result)
155
+        self.assertEqual(base_url_no_version, result)

+ 1
- 1
manila/tests/share/test_migration.py View File

@@ -510,4 +510,4 @@ class ShareMigrationHelperTestCase(test.TestCase):
510 510
         self.helper.deny_rules_and_wait.assert_called_once_with(
511 511
             self.context, self.share, access_active)
512 512
         self.helper.add_rules_and_wait.assert_called_once_with(
513
-            self.context, self.share, access_active)
513
+            self.context, self.share, access_active)

+ 1
- 1
manila_tempest_tests/tests/api/admin/test_scheduler_stats.py View File

@@ -140,4 +140,4 @@ class SchedulerStatsAdminTest(base.BaseSharesAdminTest):
140 140
         self.assertEmpty(pool_list)
141 141
 
142 142
     def _wrap_regex_for_exact_match(self, regex):
143
-        return '^%s$' % regex
143
+        return '^%s$' % regex

+ 1
- 1
test-requirements.txt View File

@@ -3,7 +3,7 @@
3 3
 # process, which may cause wedges in the gate later.
4 4
 
5 5
 # hacking should be first
6
-hacking<0.10,>=0.9.2
6
+hacking<0.11,>=0.10.2
7 7
 
8 8
 bashate>=0.2 # Apache-2.0
9 9
 coverage>=3.6

+ 4
- 4
tox.ini View File

@@ -57,10 +57,10 @@ commands = python tools/lintstack.py check
57 57
 
58 58
 [flake8]
59 59
 # Following checks are ignored on purpose:
60
-#
61
-# H904 wrap long lines in parentheses instead of a backslash
62
-# reason: removed in hacking (https://review.openstack.org/#/c/101701/)
63
-ignore = H904
60
+# H105 using author tags
61
+# H238 hacking no old style class
62
+# H501 hacking no locals
63
+ignore = H105,H238,H501
64 64
 builtins = _
65 65
 exclude = .venv,.tox,dist,doc,*egg
66 66
 

Loading…
Cancel
Save