diff --git a/keystoneclient/exceptions.py b/keystoneclient/exceptions.py index 6eece7b7b..833b3925a 100644 --- a/keystoneclient/exceptions.py +++ b/keystoneclient/exceptions.py @@ -19,7 +19,8 @@ class AuthorizationFailure(Exception): class NoTokenLookupException(Exception): """This form of authentication does not support looking up - endpoints from an existing token.""" + endpoints from an existing token. + """ pass diff --git a/keystoneclient/openstack/common/memorycache.py b/keystoneclient/openstack/common/memorycache.py index 60be8963b..18d2cf3ae 100644 --- a/keystoneclient/openstack/common/memorycache.py +++ b/keystoneclient/openstack/common/memorycache.py @@ -57,7 +57,8 @@ class Client(object): def get(self, key): """Retrieves the value for a key or None. - this expunges expired keys during each get""" + this expunges expired keys during each get + """ now = timeutils.utcnow_ts() for k in self.cache.keys(): diff --git a/keystoneclient/openstack/common/timeutils.py b/keystoneclient/openstack/common/timeutils.py index ec279b438..31ea57467 100644 --- a/keystoneclient/openstack/common/timeutils.py +++ b/keystoneclient/openstack/common/timeutils.py @@ -141,7 +141,8 @@ def clear_time_override(): def marshall_now(now=None): """Make an rpc-safe datetime with microseconds. - Note: tzinfo is stripped, but not required for relative times.""" + Note: tzinfo is stripped, but not required for relative times. + """ if not now: now = utcnow() return dict(day=now.day, month=now.month, year=now.year, hour=now.hour, diff --git a/keystoneclient/service_catalog.py b/keystoneclient/service_catalog.py index b73f67ab4..0fbc18cc3 100644 --- a/keystoneclient/service_catalog.py +++ b/keystoneclient/service_catalog.py @@ -93,7 +93,8 @@ class ServiceCatalog(object): class ServiceCatalogV2(ServiceCatalog): """An object for encapsulating the service catalog using raw v2 auth token - from Keystone.""" + from Keystone. + """ def __init__(self, resource_dict, region_name=None): self.catalog = resource_dict @@ -179,7 +180,8 @@ class ServiceCatalogV2(ServiceCatalog): class ServiceCatalogV3(ServiceCatalog): """An object for encapsulating the service catalog using raw v3 auth token - from Keystone.""" + from Keystone. + """ def __init__(self, token, resource_dict, region_name=None): self._auth_token = token diff --git a/keystoneclient/v2_0/client.py b/keystoneclient/v2_0/client.py index ffd1ff65a..956a103fb 100644 --- a/keystoneclient/v2_0/client.py +++ b/keystoneclient/v2_0/client.py @@ -197,7 +197,8 @@ class Client(client.HTTPClient): """Takes a username, password, and optionally a tenant_id or tenant_name to get an authentication token from keystone. May also take a token and a tenant_id to re-scope a token - to a tenant.""" + to a tenant. + """ headers = {} url = auth_url + "/tokens" if token: diff --git a/tests/test_auth_token_middleware.py b/tests/test_auth_token_middleware.py index c308aebc1..8f3960213 100644 --- a/tests/test_auth_token_middleware.py +++ b/tests/test_auth_token_middleware.py @@ -699,7 +699,8 @@ if tuple(sys.version_info)[0:2] < (2, 7): class AdjustedBaseAuthTokenMiddlewareTest(BaseAuthTokenMiddlewareTest): def assertIsInstance(self, obj, cls, msg=None): """Same as self.assertTrue(isinstance(obj, cls)), with a nicer - default message.""" + default message. + """ if not isinstance(obj, cls): standardMsg = '%s is not an instance of %r' % (obj, cls) self.fail(self._formatMessage(msg, standardMsg)) diff --git a/tests/test_shell.py b/tests/test_shell.py index a38191475..468ecd486 100644 --- a/tests/test_shell.py +++ b/tests/test_shell.py @@ -293,7 +293,8 @@ class ShellTest(utils.TestCase): def test_shell_tenant_id_args(self): """Test a corner case where --tenant_id appears on the - command-line twice""" + command-line twice. + """ do_ec2_mock = mock.MagicMock() # grab the decorators for do_ec2_create_credentials ec2_func = getattr(shell_v2_0, 'do_ec2_credentials_create') diff --git a/tox.ini b/tox.ini index 47689dc9b..093c2ef92 100644 --- a/tox.ini +++ b/tox.ini @@ -35,9 +35,8 @@ downloadcache = ~/cache/pip # H302: import only modules # H304: no relative imports # H306: imports not in alphabetical order -# H403: multi line docstring end on new line # H404: multi line docstring should start with a summary # H802: git commit title -ignore = F811,F821,F841,H201,H202,H302,H304,H306,H403,H404,H802 +ignore = F811,F821,F841,H201,H202,H302,H304,H306,H404,H802 show-source = True exclude = .venv,.tox,dist,doc,*egg,build