From 85082c578230fe24811b687ed779607996b0b81e Mon Sep 17 00:00:00 2001 From: LiuNanke Date: Thu, 14 Jan 2016 16:43:21 +0800 Subject: [PATCH] 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 b1fe19ebebe47a36b905d709467f5e82521bbd96 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 --- manila/api/views/versions.py | 2 +- manila/share/drivers/netapp/dataontap/protocols/base.py | 2 +- manila/tests/api/openstack/test_versioned_method.py | 2 +- manila/tests/api/test_versions.py | 2 +- manila/tests/api/v2/test_share_types.py | 2 +- manila/tests/api/views/test_versions.py | 2 +- manila/tests/share/test_migration.py | 2 +- .../tests/api/admin/test_scheduler_stats.py | 2 +- test-requirements.txt | 2 +- tox.ini | 8 ++++---- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/manila/api/views/versions.py b/manila/api/views/versions.py index ce26378fea..b2bddcd39c 100644 --- a/manila/api/views/versions.py +++ b/manila/api/views/versions.py @@ -63,4 +63,4 @@ class ViewBuilder(object): def _get_base_url_without_version(self): """Get the base URL with out the /v1 suffix.""" - return re.sub('v[1-9]+/?$', '', self.base_url) \ No newline at end of file + return re.sub('v[1-9]+/?$', '', self.base_url) diff --git a/manila/share/drivers/netapp/dataontap/protocols/base.py b/manila/share/drivers/netapp/dataontap/protocols/base.py index c9fbd568f0..7fad859d1f 100644 --- a/manila/share/drivers/netapp/dataontap/protocols/base.py +++ b/manila/share/drivers/netapp/dataontap/protocols/base.py @@ -50,4 +50,4 @@ class NetAppBaseHelper(object): @abc.abstractmethod def get_share_name_for_share(self, share): - """Returns the flexvol name that hosts a share.""" \ No newline at end of file + """Returns the flexvol name that hosts a share.""" diff --git a/manila/tests/api/openstack/test_versioned_method.py b/manila/tests/api/openstack/test_versioned_method.py index 4bf6b725bf..b4b2569822 100644 --- a/manila/tests/api/openstack/test_versioned_method.py +++ b/manila/tests/api/openstack/test_versioned_method.py @@ -33,4 +33,4 @@ class VersionedMethodTestCase(test.TestCase): method = versioned_method.VersionedMethod( 'fake_name', 'fake_start_version', 'fake_end_version', False, 'fake_func') - self.assertEqual('fake_start_version', method._cmpkey()) \ No newline at end of file + self.assertEqual('fake_start_version', method._cmpkey()) diff --git a/manila/tests/api/test_versions.py b/manila/tests/api/test_versions.py index 0045d24de1..c08ef8d37d 100644 --- a/manila/tests/api/test_versions.py +++ b/manila/tests/api/test_versions.py @@ -221,4 +221,4 @@ class ExperimentalAPITestCase(test.TestCase): response = self.req.get_response(self.app) self.assertEqual(404, response.status_int) - self.assertTrue(response.headers.get(experimental_header_name)) \ No newline at end of file + self.assertTrue(response.headers.get(experimental_header_name)) diff --git a/manila/tests/api/v2/test_share_types.py b/manila/tests/api/v2/test_share_types.py index 48f786ad29..355846b615 100644 --- a/manila/tests/api/v2/test_share_types.py +++ b/manila/tests/api/v2/test_share_types.py @@ -678,4 +678,4 @@ class ShareTypeAccessTest(test.TestCase): self.assertRaises(webob.exc.HTTPNotFound, self.controller._remove_project_access, - req, '777', body) \ No newline at end of file + req, '777', body) diff --git a/manila/tests/api/views/test_versions.py b/manila/tests/api/views/test_versions.py index 90621c3679..dfbbe5535a 100644 --- a/manila/tests/api/views/test_versions.py +++ b/manila/tests/api/views/test_versions.py @@ -152,4 +152,4 @@ class ViewBuilderTestCase(test.TestCase): result = builder._get_base_url_without_version() - self.assertEqual(base_url_no_version, result) \ No newline at end of file + self.assertEqual(base_url_no_version, result) diff --git a/manila/tests/share/test_migration.py b/manila/tests/share/test_migration.py index 8a92be88e4..298290033b 100644 --- a/manila/tests/share/test_migration.py +++ b/manila/tests/share/test_migration.py @@ -510,4 +510,4 @@ class ShareMigrationHelperTestCase(test.TestCase): self.helper.deny_rules_and_wait.assert_called_once_with( self.context, self.share, access_active) self.helper.add_rules_and_wait.assert_called_once_with( - self.context, self.share, access_active) \ No newline at end of file + self.context, self.share, access_active) diff --git a/manila_tempest_tests/tests/api/admin/test_scheduler_stats.py b/manila_tempest_tests/tests/api/admin/test_scheduler_stats.py index 576e49925d..973e52e425 100644 --- a/manila_tempest_tests/tests/api/admin/test_scheduler_stats.py +++ b/manila_tempest_tests/tests/api/admin/test_scheduler_stats.py @@ -140,4 +140,4 @@ class SchedulerStatsAdminTest(base.BaseSharesAdminTest): self.assertEmpty(pool_list) def _wrap_regex_for_exact_match(self, regex): - return '^%s$' % regex \ No newline at end of file + return '^%s$' % regex diff --git a/test-requirements.txt b/test-requirements.txt index ef734f7663..6428f880c2 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -3,7 +3,7 @@ # process, which may cause wedges in the gate later. # hacking should be first -hacking<0.10,>=0.9.2 +hacking<0.11,>=0.10.2 bashate>=0.2 # Apache-2.0 coverage>=3.6 diff --git a/tox.ini b/tox.ini index 32673a55c2..09fbc42052 100644 --- a/tox.ini +++ b/tox.ini @@ -57,10 +57,10 @@ commands = python tools/lintstack.py check [flake8] # Following checks are ignored on purpose: -# -# H904 wrap long lines in parentheses instead of a backslash -# reason: removed in hacking (https://review.openstack.org/#/c/101701/) -ignore = H904 +# H105 using author tags +# H238 hacking no old style class +# H501 hacking no locals +ignore = H105,H238,H501 builtins = _ exclude = .venv,.tox,dist,doc,*egg