Prepare for hacking 0.10.x

Fix new warning that are introduced with hacking 0.10.x.
The failure messages fixed are:
H238  old style class declaration, use new style (inherit from `object`)
H105  Don't use author tags
H501  Do not use self.__dict__ for string formatting

Change-Id: Ia070d60754dfd85966178eadbf82a4d98b64407a
This commit is contained in:
Andreas Jaeger 2015-05-19 09:25:57 +02:00
parent fe2f445418
commit 2720765cb3
10 changed files with 11 additions and 19 deletions

View File

@ -2,8 +2,6 @@
#
# Copyright © 2012 New Dream Network, LLC (DreamHost)
#
# Author: Doug Hellmann <doug.hellmann@dreamhost.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at

View File

@ -2,8 +2,6 @@
#
# Copyright © 2012 New Dream Network, LLC (DreamHost)
#
# Author: Doug Hellmann <doug.hellmann@dreamhost.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at

View File

@ -2,8 +2,6 @@
#
# Copyright © 2012 New Dream Network, LLC (DreamHost)
#
# Author: Doug Hellmann <doug.hellmann@dreamhost.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at

View File

@ -2,8 +2,6 @@
#
# Copyright © 2012 New Dream Network, LLC (DreamHost)
#
# Author: Doug Hellmann <doug.hellmann@dreamhost.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at

View File

@ -2,8 +2,6 @@
#
# Copyright © 2012 eNovance <licensing@enovance.com>
#
# Author: Julien Danjou <julien@danjou.info>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at

View File

@ -32,7 +32,7 @@ from ironic.openstack.common import versionutils
LOG = logging.getLogger('object')
class NotSpecifiedSentinel:
class NotSpecifiedSentinel(object):
pass

View File

@ -34,7 +34,7 @@ from ironic.tests.objects import utils as obj_utils
INFO_DICT = db_utils.get_test_seamicro_info()
class Fake_Server():
class Fake_Server(object):
def __init__(self, active=False, *args, **kwargs):
self.active = active
self.nic = {'0': {'untaggedVlan': ''}}
@ -64,7 +64,7 @@ class Fake_Server():
return self
class Fake_Volume():
class Fake_Volume(object):
def __init__(self, id=None, *args, **kwargs):
if id is None:
self.id = "%s/%s/%s" % ("0", "ironic-p6-6", str(uuid.uuid4()))
@ -72,7 +72,7 @@ class Fake_Volume():
self.id = id
class Fake_Pool():
class Fake_Pool(object):
def __init__(self, freeSize=None, *args, **kwargs):
self.freeSize = freeSize

View File

@ -26,7 +26,8 @@ class DictKeysMismatch(object):
def describe(self):
return ('Keys in d1 and not d2: %(d1only)s.'
' Keys in d2 and not d1: %(d2only)s' % self.__dict__)
' Keys in d2 and not d1: %(d2only)s' %
{'d1only': self.d1only, 'd2only': self.d2only})
def get_details(self):
return {}
@ -40,7 +41,8 @@ class DictMismatch(object):
def describe(self):
return ("Dictionaries do not match at %(key)s."
" d1: %(d1_value)s d2: %(d2_value)s" % self.__dict__)
" d1: %(d1_value)s d2: %(d2_value)s" %
{'d1_value': self.d1_value, 'd2_value': self.d2_value})
def get_details(self):
return {}

View File

@ -20,7 +20,7 @@ from ironic.common import exception
from ironic.tests import base
class FakeEp:
class FakeEp(object):
name = 'fake'

View File

@ -20,12 +20,12 @@ from ironic.common import keystone
from ironic.tests import base
class FakeCatalog:
class FakeCatalog(object):
def url_for(self, **kwargs):
return 'fake-url'
class FakeClient:
class FakeClient(object):
def __init__(self, **kwargs):
self.service_catalog = FakeCatalog()