diff --git a/test-requirements.txt b/test-requirements.txt index 6c5f39f2..d0ea1de5 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 0a455093..a7bcc0ef 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 b6105f01..39517b52 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 10ff0dba..13b195f3 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 8c733a8e..b4e6e194 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 abf84301..4034077c 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 56479e25..64238abb 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):