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:
parent
fe2f445418
commit
2720765cb3
@ -2,8 +2,6 @@
|
|||||||
#
|
#
|
||||||
# Copyright © 2012 New Dream Network, LLC (DreamHost)
|
# 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
|
# 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
|
# not use this file except in compliance with the License. You may obtain
|
||||||
# a copy of the License at
|
# a copy of the License at
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
#
|
#
|
||||||
# Copyright © 2012 New Dream Network, LLC (DreamHost)
|
# 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
|
# 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
|
# not use this file except in compliance with the License. You may obtain
|
||||||
# a copy of the License at
|
# a copy of the License at
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
#
|
#
|
||||||
# Copyright © 2012 New Dream Network, LLC (DreamHost)
|
# 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
|
# 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
|
# not use this file except in compliance with the License. You may obtain
|
||||||
# a copy of the License at
|
# a copy of the License at
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
#
|
#
|
||||||
# Copyright © 2012 New Dream Network, LLC (DreamHost)
|
# 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
|
# 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
|
# not use this file except in compliance with the License. You may obtain
|
||||||
# a copy of the License at
|
# a copy of the License at
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
#
|
#
|
||||||
# Copyright © 2012 eNovance <licensing@enovance.com>
|
# Copyright © 2012 eNovance <licensing@enovance.com>
|
||||||
#
|
#
|
||||||
# Author: Julien Danjou <julien@danjou.info>
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
# 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
|
# not use this file except in compliance with the License. You may obtain
|
||||||
# a copy of the License at
|
# a copy of the License at
|
||||||
|
@ -32,7 +32,7 @@ from ironic.openstack.common import versionutils
|
|||||||
LOG = logging.getLogger('object')
|
LOG = logging.getLogger('object')
|
||||||
|
|
||||||
|
|
||||||
class NotSpecifiedSentinel:
|
class NotSpecifiedSentinel(object):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ from ironic.tests.objects import utils as obj_utils
|
|||||||
INFO_DICT = db_utils.get_test_seamicro_info()
|
INFO_DICT = db_utils.get_test_seamicro_info()
|
||||||
|
|
||||||
|
|
||||||
class Fake_Server():
|
class Fake_Server(object):
|
||||||
def __init__(self, active=False, *args, **kwargs):
|
def __init__(self, active=False, *args, **kwargs):
|
||||||
self.active = active
|
self.active = active
|
||||||
self.nic = {'0': {'untaggedVlan': ''}}
|
self.nic = {'0': {'untaggedVlan': ''}}
|
||||||
@ -64,7 +64,7 @@ class Fake_Server():
|
|||||||
return self
|
return self
|
||||||
|
|
||||||
|
|
||||||
class Fake_Volume():
|
class Fake_Volume(object):
|
||||||
def __init__(self, id=None, *args, **kwargs):
|
def __init__(self, id=None, *args, **kwargs):
|
||||||
if id is None:
|
if id is None:
|
||||||
self.id = "%s/%s/%s" % ("0", "ironic-p6-6", str(uuid.uuid4()))
|
self.id = "%s/%s/%s" % ("0", "ironic-p6-6", str(uuid.uuid4()))
|
||||||
@ -72,7 +72,7 @@ class Fake_Volume():
|
|||||||
self.id = id
|
self.id = id
|
||||||
|
|
||||||
|
|
||||||
class Fake_Pool():
|
class Fake_Pool(object):
|
||||||
def __init__(self, freeSize=None, *args, **kwargs):
|
def __init__(self, freeSize=None, *args, **kwargs):
|
||||||
self.freeSize = freeSize
|
self.freeSize = freeSize
|
||||||
|
|
||||||
|
@ -26,7 +26,8 @@ class DictKeysMismatch(object):
|
|||||||
|
|
||||||
def describe(self):
|
def describe(self):
|
||||||
return ('Keys in d1 and not d2: %(d1only)s.'
|
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):
|
def get_details(self):
|
||||||
return {}
|
return {}
|
||||||
@ -40,7 +41,8 @@ class DictMismatch(object):
|
|||||||
|
|
||||||
def describe(self):
|
def describe(self):
|
||||||
return ("Dictionaries do not match at %(key)s."
|
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):
|
def get_details(self):
|
||||||
return {}
|
return {}
|
||||||
|
@ -20,7 +20,7 @@ from ironic.common import exception
|
|||||||
from ironic.tests import base
|
from ironic.tests import base
|
||||||
|
|
||||||
|
|
||||||
class FakeEp:
|
class FakeEp(object):
|
||||||
name = 'fake'
|
name = 'fake'
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,12 +20,12 @@ from ironic.common import keystone
|
|||||||
from ironic.tests import base
|
from ironic.tests import base
|
||||||
|
|
||||||
|
|
||||||
class FakeCatalog:
|
class FakeCatalog(object):
|
||||||
def url_for(self, **kwargs):
|
def url_for(self, **kwargs):
|
||||||
return 'fake-url'
|
return 'fake-url'
|
||||||
|
|
||||||
|
|
||||||
class FakeClient:
|
class FakeClient(object):
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
self.service_catalog = FakeCatalog()
|
self.service_catalog = FakeCatalog()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user