Browse Source

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
Joe Gordon 4 years ago
parent
commit
0eb2e72d38
3 changed files with 7 additions and 13 deletions
  1. 5
    5
      novaclient/v1_1/shell.py
  2. 1
    1
      test-requirements.txt
  3. 1
    7
      tox.ini

+ 5
- 5
novaclient/v1_1/shell.py View File

@@ -2234,7 +2234,7 @@ def do_get_vnc_console(cs, args):
2234 2234
     server = _find_server(cs, args.server)
2235 2235
     data = server.get_vnc_console(args.console_type)
2236 2236
 
2237
-    class VNCConsole:
2237
+    class VNCConsole(object):
2238 2238
         def __init__(self, console_dict):
2239 2239
             self.type = console_dict['type']
2240 2240
             self.url = console_dict['url']
@@ -2252,7 +2252,7 @@ def do_get_spice_console(cs, args):
2252 2252
     server = _find_server(cs, args.server)
2253 2253
     data = server.get_spice_console(args.console_type)
2254 2254
 
2255
-    class SPICEConsole:
2255
+    class SPICEConsole(object):
2256 2256
         def __init__(self, console_dict):
2257 2257
             self.type = console_dict['type']
2258 2258
             self.url = console_dict['url']
@@ -2270,7 +2270,7 @@ def do_get_rdp_console(cs, args):
2270 2270
     server = _find_server(cs, args.server)
2271 2271
     data = server.get_rdp_console(args.console_type)
2272 2272
 
2273
-    class RDPConsole:
2273
+    class RDPConsole(object):
2274 2274
         def __init__(self, console_dict):
2275 2275
             self.type = console_dict['type']
2276 2276
             self.url = console_dict['url']
@@ -2292,7 +2292,7 @@ def do_get_serial_console(cs, args):
2292 2292
     server = _find_server(cs, args.server)
2293 2293
     data = server.get_serial_console(args.console_type)
2294 2294
 
2295
-    class SerialConsole:
2295
+    class SerialConsole(object):
2296 2296
         def __init__(self, console_dict):
2297 2297
             self.type = console_dict['type']
2298 2298
             self.url = console_dict['url']
@@ -2577,7 +2577,7 @@ def do_dns_create_public_domain(cs, args):
2577 2577
 
2578 2578
 
2579 2579
 def _print_secgroup_rules(rules, show_source_group=True):
2580
-    class FormattedRule:
2580
+    class FormattedRule(object):
2581 2581
         def __init__(self, obj):
2582 2582
             items = (obj if isinstance(obj, dict) else obj._info).items()
2583 2583
             for k, v in items:

+ 1
- 1
test-requirements.txt View File

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

+ 1
- 7
tox.ini View File

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

Loading…
Cancel
Save