summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSushil Kumar <sushil.kumar3@hp.com>2015-05-20 20:13:02 +0000
committerSushil Kumar <sushil.kumar3@hp.com>2015-05-26 08:58:51 +0000
commit025191af5068a853e527faeb826bd3fec40677ae (patch)
tree52673f01ece93d6c3581725e54ae0ad64ae91ae0
parent82e05cb13a5cdd9c7a2accf07170eb26762d8879 (diff)
downloadpython-troveclient-1.2.0.tar.gz
Fixes new hacking rules1.2.0
Updated the hacking version as per global-requirements. Fixed some of new appearing hacking rules, as listed follows: - E128 continuation line under-indented for visual indent - E265 block comment should start with '# ' - E713 test for membership should be 'not in' - H238 old style class declaration, use new style (inherit from `object`) Rules which are not yet fixed have been incorporated to ignorelist - H405 Multi line docstrings should start with a one line summary followed by an empty line - H501 Do not use locals() or self.__dict__ for formatting strings Change-Id: I885c6fa8ad0e6a98f7a8479f3441ed08ed2cbaa6
-rw-r--r--test-requirements.txt2
-rw-r--r--tox.ini2
-rw-r--r--troveclient/compat/tests/test_common.py2
-rw-r--r--troveclient/openstack/common/apiclient/base.py2
-rw-r--r--troveclient/openstack/common/apiclient/fake_client.py2
-rw-r--r--troveclient/shell.py6
-rw-r--r--troveclient/v1/flavors.py2
7 files changed, 9 insertions, 9 deletions
diff --git a/test-requirements.txt b/test-requirements.txt
index 6c5f39f..d0ea1de 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.8.0,<0.9
+hacking>=0.10.0,<0.11
coverage>=3.6
discover
oslosphinx>=2.5.0 # Apache-2.0
diff --git a/tox.ini b/tox.ini
index 0a45509..a7bcc0e 100644
--- a/tox.ini
+++ b/tox.ini
@@ -37,6 +37,6 @@ commands =
python setup.py build_sphinx
[flake8]
-ignore = H202
+ignore = H202,H405,H501
show-source = True
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,
diff --git a/troveclient/compat/tests/test_common.py b/troveclient/compat/tests/test_common.py
index b6105f0..39517b5 100644
--- a/troveclient/compat/tests/test_common.py
+++ b/troveclient/compat/tests/test_common.py
@@ -40,7 +40,7 @@ class CommonTest(testtools.TestCase):
sys.exit = self.orig_sys_exit
def test_methods_of(self):
- class DummyClass:
+ class DummyClass(object):
def dummyMethod(self):
print("just for test")
diff --git a/troveclient/openstack/common/apiclient/base.py b/troveclient/openstack/common/apiclient/base.py
index 10ff0db..13b195f 100644
--- a/troveclient/openstack/common/apiclient/base.py
+++ b/troveclient/openstack/common/apiclient/base.py
@@ -456,7 +456,7 @@ class Resource(object):
def __getattr__(self, k):
if k not in self.__dict__:
- #NOTE(bcwaldon): disallow lazy-loading if already loaded once
+ # NOTE(bcwaldon): disallow lazy-loading if already loaded once
if not self.is_loaded:
self._get()
return self.__getattr__(k)
diff --git a/troveclient/openstack/common/apiclient/fake_client.py b/troveclient/openstack/common/apiclient/fake_client.py
index 8c733a8..b4e6e19 100644
--- a/troveclient/openstack/common/apiclient/fake_client.py
+++ b/troveclient/openstack/common/apiclient/fake_client.py
@@ -79,7 +79,7 @@ class FakeHTTPClient(client.HTTPClient):
def __init__(self, *args, **kwargs):
self.callstack = []
self.fixtures = kwargs.pop("fixtures", None) or {}
- if not args and not "auth_plugin" in kwargs:
+ if not args and "auth_plugin" not in kwargs:
args = (None, )
super(FakeHTTPClient, self).__init__(*args, **kwargs)
diff --git a/troveclient/shell.py b/troveclient/shell.py
index abf8430..4034077 100644
--- a/troveclient/shell.py
+++ b/troveclient/shell.py
@@ -436,9 +436,9 @@ class OpenStackTroveShell(object):
# V3 stuff
project_info_provided = (self.options.os_tenant_name or
self.options.os_tenant_id or
- (self.options.os_project_name and
- (self.options.os_project_domain_name or
- self.options.os_project_domain_id)) or
+ (self.options.os_project_name and
+ (self.options.os_project_domain_name or
+ self.options.os_project_domain_id)) or
self.options.os_project_id)
if (not project_info_provided):
diff --git a/troveclient/v1/flavors.py b/troveclient/v1/flavors.py
index 56479e2..64238ab 100644
--- a/troveclient/v1/flavors.py
+++ b/troveclient/v1/flavors.py
@@ -41,7 +41,7 @@ class Flavors(base.ManagerWithFind):
:rtype: list of :class:`Flavor`.
"""
return self._list("/datastores/%s/versions/%s/flavors" %
- (datastore, version_id),
+ (datastore, version_id),
"flavors")
def get(self, flavor):