From 28788b4ec01a3475f1a9407e3c7ff8041820ad79 Mon Sep 17 00:00:00 2001 From: Joe Gordon <joe.gordon0@gmail.com> Date: Wed, 25 Feb 2015 12:42:37 -0800 Subject: [PATCH] Move to hacking 0.10 Release notes: http://lists.openstack.org/pipermail/openstack-dev/2015-January/054165.html Fix minor changes for new/improved rules. Remove references to deleted rules. Skip new rule H105, enable in subsequent patch. Change-Id: Ibe07679034f575c403aced46c0221b96d299ea83 --- tempest/api/orchestration/stacks/test_resource_types.py | 6 ++++-- tempest/common/utils/linux/remote_client.py | 4 ++-- tempest/scenario/test_encrypted_cinder_volumes.py | 2 +- tempest/scenario/test_security_groups_basic_ops.py | 2 +- tempest/tests/common/test_custom_matchers.py | 2 +- test-requirements.txt | 2 +- tox.ini | 6 ++---- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tempest/api/orchestration/stacks/test_resource_types.py b/tempest/api/orchestration/stacks/test_resource_types.py index e204894889..820e863712 100644 --- a/tempest/api/orchestration/stacks/test_resource_types.py +++ b/tempest/api/orchestration/stacks/test_resource_types.py @@ -40,5 +40,7 @@ class ResourceTypesTest(base.BaseOrchestrationTest): """Verify it is possible to get template about resource types.""" type_template = self.client.get_resource_type_template( 'OS::Nova::Server') - self.assert_fields_in_dict(type_template, 'Outputs', - 'Parameters', 'Resources') \ No newline at end of file + self.assert_fields_in_dict( + type_template, + 'Outputs', + 'Parameters', 'Resources') diff --git a/tempest/common/utils/linux/remote_client.py b/tempest/common/utils/linux/remote_client.py index 6e61c55a4d..1f1414f4f7 100644 --- a/tempest/common/utils/linux/remote_client.py +++ b/tempest/common/utils/linux/remote_client.py @@ -23,7 +23,7 @@ from tempest import exceptions CONF = config.CONF -class RemoteClient(): +class RemoteClient(object): # NOTE(afazekas): It should always get an address instead of server def __init__(self, server, username, password=None, pkey=None): @@ -163,4 +163,4 @@ class RemoteClient(): % dhcp_client) if dhcp_client == 'udhcpc' and not fixed_ip: raise ValueError("need to set 'fixed_ip' for udhcpc client") - return getattr(self, '_renew_lease_' + dhcp_client)(fixed_ip=fixed_ip) \ No newline at end of file + return getattr(self, '_renew_lease_' + dhcp_client)(fixed_ip=fixed_ip) diff --git a/tempest/scenario/test_encrypted_cinder_volumes.py b/tempest/scenario/test_encrypted_cinder_volumes.py index ac2ef8ac61..8500adfbcf 100644 --- a/tempest/scenario/test_encrypted_cinder_volumes.py +++ b/tempest/scenario/test_encrypted_cinder_volumes.py @@ -60,4 +60,4 @@ class TestEncryptedCinderVolumes(manager.EncryptionScenarioTest): self.launch_instance() self.create_encrypted_volume('nova.volume.encryptors.' 'cryptsetup.CryptsetupEncryptor') - self.attach_detach_volume() \ No newline at end of file + self.attach_detach_volume() diff --git a/tempest/scenario/test_security_groups_basic_ops.py b/tempest/scenario/test_security_groups_basic_ops.py index 394aed0650..434ed74231 100644 --- a/tempest/scenario/test_security_groups_basic_ops.py +++ b/tempest/scenario/test_security_groups_basic_ops.py @@ -91,7 +91,7 @@ class TestSecurityGroupsBasicOps(manager.NetworkScenarioTest): its own router connected to the public network """ - class TenantProperties(): + class TenantProperties(object): """ helper class to save tenant details id diff --git a/tempest/tests/common/test_custom_matchers.py b/tempest/tests/common/test_custom_matchers.py index 57217e3cc8..2656a4736d 100644 --- a/tempest/tests/common/test_custom_matchers.py +++ b/tempest/tests/common/test_custom_matchers.py @@ -63,4 +63,4 @@ class TestMatchesDictExceptForKeys(base.TestCase, " b: expected 2, actual None\n", {'a': 1, 'b': None, 'foo': 1}, matches_matcher) - ] \ No newline at end of file + ] diff --git a/test-requirements.txt b/test-requirements.txt index 6eefeeebb4..6a9111ebd3 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,7 +1,7 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -hacking>=0.9.2,<0.10 +hacking<0.11,>=0.10.0 # needed for doc build sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3 python-subunit>=0.0.18 diff --git a/tox.ini b/tox.ini index 2e8b509f75..7313a476ea 100644 --- a/tox.ini +++ b/tox.ini @@ -120,11 +120,9 @@ import_exceptions = tempest.services [flake8] # E125 is a won't fix until https://github.com/jcrocholl/pep8/issues/126 is resolved. For further detail see https://review.openstack.org/#/c/36788/ -# H402 skipped because some docstrings aren't sentences # E123 skipped because it is ignored by default in the default pep8 # E129 skipped because it is too limiting when combined with other rules -# H305 skipped because it is inconsistent between python versions -# Skipped because of new hacking 0.9: H405,H904 -ignore = E125,H402,E123,E129,H404,H405,H904,H305 +# Skipped because of new hacking 0.9: H405 +ignore = E125,E123,E129,H404,H405,H105 show-source = True exclude = .git,.venv,.tox,dist,doc,openstack,*egg