Correct failures for H238
The new H238 "old style class declaration, use new style (inherit from `object`)" rule was failing and ignored. Now it's enforced. Change-Id: I9f616d74e4777640cc9441e96f2bd8c1873aaaca
This commit is contained in:
parent
12b6538fcc
commit
02ec2dbb2f
@ -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'
|
||||
|
@ -88,7 +88,7 @@ def register_version(version):
|
||||
_VERSIONS.append(version)
|
||||
|
||||
|
||||
class MimeTypes:
|
||||
class MimeTypes(object):
|
||||
JSON = 'application/json'
|
||||
JSON_HOME = 'application/json-home'
|
||||
|
||||
|
@ -13,6 +13,6 @@
|
||||
# under the License.
|
||||
|
||||
|
||||
class EntityType:
|
||||
class EntityType(object):
|
||||
USER = 'user'
|
||||
GROUP = 'group'
|
||||
|
@ -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)
|
||||
|
@ -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 = {}
|
||||
|
||||
|
@ -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'}
|
||||
|
||||
|
3
tox.ini
3
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user