Move to hacking 0.10

Release notes: http://lists.openstack.org/pipermail/openstack-dev/2015-January/054165.html

Explicitly move everything to new style classes (H238).
http://python3porting.com/preparing.html#use-new-style-classes

Remove deleted hacking rules from tox.ini

Change-Id: If65b0060e6f64a456b4869ef4129ad15aef107fb
This commit is contained in:
Joe Gordon 2015-01-11 01:30:19 +00:00
parent 71fe9cb82e
commit 0eb2e72d38
3 changed files with 7 additions and 13 deletions

View File

@ -2234,7 +2234,7 @@ def do_get_vnc_console(cs, args):
server = _find_server(cs, args.server)
data = server.get_vnc_console(args.console_type)
class VNCConsole:
class VNCConsole(object):
def __init__(self, console_dict):
self.type = console_dict['type']
self.url = console_dict['url']
@ -2252,7 +2252,7 @@ def do_get_spice_console(cs, args):
server = _find_server(cs, args.server)
data = server.get_spice_console(args.console_type)
class SPICEConsole:
class SPICEConsole(object):
def __init__(self, console_dict):
self.type = console_dict['type']
self.url = console_dict['url']
@ -2270,7 +2270,7 @@ def do_get_rdp_console(cs, args):
server = _find_server(cs, args.server)
data = server.get_rdp_console(args.console_type)
class RDPConsole:
class RDPConsole(object):
def __init__(self, console_dict):
self.type = console_dict['type']
self.url = console_dict['url']
@ -2292,7 +2292,7 @@ def do_get_serial_console(cs, args):
server = _find_server(cs, args.server)
data = server.get_serial_console(args.console_type)
class SerialConsole:
class SerialConsole(object):
def __init__(self, console_dict):
self.type = console_dict['type']
self.url = console_dict['url']
@ -2577,7 +2577,7 @@ def do_dns_create_public_domain(cs, args):
def _print_secgroup_rules(rules, show_source_group=True):
class FormattedRule:
class FormattedRule(object):
def __init__(self, obj):
items = (obj if isinstance(obj, dict) else obj._info).items()
for k, v in items:

View File

@ -1,7 +1,7 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
hacking>=0.9.2,<0.10
hacking>=0.10.0,<0.11
coverage>=3.6
discover

View File

@ -35,14 +35,8 @@ downloadcache = ~/cache/pip
#
# Following checks are ignored on purpose.
#
# H402 one line docstring needs punctuation
# reason: removed in hacking (https://review.openstack.org/#/c/101497/)
#
# H904 wrap long lines in parentheses instead of a backslash
# reason: removed in hacking (https://review.openstack.org/#/c/101701/)
#
# Additional checks are also ignored on purpose: F811, F821
ignore = E124,F811,F821,H402,H404,H405,H904
ignore = E124,F811,F821,H404,H405
show-source = True
exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,build,doc/source/conf.py