diff --git a/keystone/assignment/backends/sql.py b/keystone/assignment/backends/sql.py index b0de38d2f1..65e7336323 100644 --- a/keystone/assignment/backends/sql.py +++ b/keystone/assignment/backends/sql.py @@ -29,7 +29,7 @@ CONF = config.CONF LOG = log.getLogger(__name__) -class AssignmentType: +class AssignmentType(object): USER_PROJECT = 'UserProject' GROUP_PROJECT = 'GroupProject' USER_DOMAIN = 'UserDomain' diff --git a/keystone/controllers.py b/keystone/controllers.py index 4c8190f637..25f34bfc43 100644 --- a/keystone/controllers.py +++ b/keystone/controllers.py @@ -88,7 +88,7 @@ def register_version(version): _VERSIONS.append(version) -class MimeTypes: +class MimeTypes(object): JSON = 'application/json' JSON_HOME = 'application/json-home' diff --git a/keystone/identity/mapping_backends/mapping.py b/keystone/identity/mapping_backends/mapping.py index ca738188ce..dddf36c116 100644 --- a/keystone/identity/mapping_backends/mapping.py +++ b/keystone/identity/mapping_backends/mapping.py @@ -13,6 +13,6 @@ # under the License. -class EntityType: +class EntityType(object): USER = 'user' GROUP = 'group' diff --git a/keystone/tests/core.py b/keystone/tests/core.py index 5b3c763b15..b35493ab56 100644 --- a/keystone/tests/core.py +++ b/keystone/tests/core.py @@ -92,7 +92,7 @@ os.makedirs(TMPDIR) atexit.register(shutil.rmtree, TMPDIR) -class dirs: +class dirs(object): @staticmethod def root(*p): return os.path.join(ROOTDIR, *p) diff --git a/keystone/tests/test_v3.py b/keystone/tests/test_v3.py index 28595c59ad..e460c67f29 100644 --- a/keystone/tests/test_v3.py +++ b/keystone/tests/test_v3.py @@ -1215,7 +1215,7 @@ class VersionTestCase(RestfulTestCase): class AuthContextMiddlewareTestCase(RestfulTestCase): def _mock_request_object(self, token_id): - class fake_req: + class fake_req(object): headers = {middleware.AUTH_TOKEN_HEADER: token_id} environ = {} diff --git a/keystone/tests/unit/common/test_notifications.py b/keystone/tests/unit/common/test_notifications.py index ab49b6537e..f219c481bc 100644 --- a/keystone/tests/unit/common/test_notifications.py +++ b/keystone/tests/unit/common/test_notifications.py @@ -509,7 +509,7 @@ class TestEventCallbacks(test_v3.RestfulTestCase): callback_called = [] @dependency.provider('foo_api') - class Foo: + class Foo(object): def __init__(self): self.event_callbacks = { CREATED_OPERATION: {'project': [self.foo_callback]}} @@ -526,7 +526,7 @@ class TestEventCallbacks(test_v3.RestfulTestCase): def test_invalid_event_callbacks(self): @dependency.provider('foo_api') - class Foo: + class Foo(object): def __init__(self): self.event_callbacks = 'bogus' @@ -534,7 +534,7 @@ class TestEventCallbacks(test_v3.RestfulTestCase): def test_invalid_event_callbacks_event(self): @dependency.provider('foo_api') - class Foo: + class Foo(object): def __init__(self): self.event_callbacks = {CREATED_OPERATION: 'bogus'} diff --git a/tox.ini b/tox.ini index 5d689f211d..ccffa4e605 100644 --- a/tox.ini +++ b/tox.ini @@ -96,8 +96,7 @@ filename= *.py,keystone-all,keystone-manage show-source = true # H405 multi line docstring summary not separated with an empty line -# New from hacking 0.10: H238 -ignore = H238,H405 +ignore = H405 exclude=.venv,.git,.tox,build,dist,doc,*openstack/common*,*lib/python*,*egg,tools,vendor,.update-venv,*.ini,*.po,*.pot max-complexity=24