From e2ca29134cb266ada2e171f3f654a22860c40aec Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Mon, 23 Mar 2015 15:15:16 +0900 Subject: [PATCH] Update hacking to 0.10 Release notes: http://git.openstack.org/cgit/openstack-dev/hacking/tag/?id=0.10.0 * Fix W292 (no newline at end of file) * Fix H238 (old style class declaration, use new style) * Skip H105 (Don't use author tags) temporarily. * Remove H307 from ignore list since it is removed from Hacking rule. * Remove H302 (import only modules) since there is no violation now. Change-Id: Ic5967652819c9c322de327d504882a0e3029d462 --- neutronclient/neutron/v2_0/agentscheduler.py | 2 +- neutronclient/tests/unit/test_cli20.py | 2 +- neutronclient/tests/unit/test_validators.py | 2 +- test-requirements.txt | 2 +- tox.ini | 5 ++--- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/neutronclient/neutron/v2_0/agentscheduler.py b/neutronclient/neutron/v2_0/agentscheduler.py index 6776b99..ca16100 100644 --- a/neutronclient/neutron/v2_0/agentscheduler.py +++ b/neutronclient/neutron/v2_0/agentscheduler.py @@ -327,4 +327,4 @@ class GetLbaasAgentHostingLoadBalancer(neutronV20.ListCommand): agent = neutron_client.get_lbaas_agent_hosting_loadbalancer( **search_opts) data = {'agents': [agent['agent']]} - return data \ No newline at end of file + return data diff --git a/neutronclient/tests/unit/test_cli20.py b/neutronclient/tests/unit/test_cli20.py index 657b15e..ee6d7ac 100644 --- a/neutronclient/tests/unit/test_cli20.py +++ b/neutronclient/tests/unit/test_cli20.py @@ -50,7 +50,7 @@ def capture_std_streams(): sys.stdout, sys.stderr = stdout, stderr -class FakeStdout: +class FakeStdout(object): def __init__(self): self.content = [] diff --git a/neutronclient/tests/unit/test_validators.py b/neutronclient/tests/unit/test_validators.py index 619acb8..a92496b 100644 --- a/neutronclient/tests/unit/test_validators.py +++ b/neutronclient/tests/unit/test_validators.py @@ -19,7 +19,7 @@ from neutronclient.common import exceptions from neutronclient.common import validators -class FakeParsedArgs(): +class FakeParsedArgs(object): pass diff --git a/test-requirements.txt b/test-requirements.txt index 08b1781..1c9cd43 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.10.0,<0.11 cliff-tablib>=1.0 coverage>=3.6 diff --git a/tox.ini b/tox.ini index dbed9e6..94ab882 100644 --- a/tox.ini +++ b/tox.ini @@ -38,12 +38,11 @@ downloadcache = ~/cache/pip [flake8] # E125 continuation line does not distinguish itself from next logical line -# H302 import only modules # # TODO Fix the following rules from hacking 0.9.x # E265 block comment should start with '# ' +# H105 Don't use author tags # H405 multi line docstring summary not separated with an empty line -# H307 like imports should be grouped together -ignore = E125,E265,H302,H307,H405 +ignore = E125,E265,H105,H405 show-source = true exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools