Merge "Defaults are ignored with flake8"
This commit is contained in:
commit
277c16c8b7
@ -32,14 +32,14 @@ class ServerTests(test.TestCase):
|
|||||||
def get_flavor(cls):
|
def get_flavor(cls):
|
||||||
raw_output = cls.openstack('flavor list -f value -c ID')
|
raw_output = cls.openstack('flavor list -f value -c ID')
|
||||||
ray = raw_output.split('\n')
|
ray = raw_output.split('\n')
|
||||||
idx = int(len(ray)/2)
|
idx = int(len(ray) / 2)
|
||||||
return ray[idx]
|
return ray[idx]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_image(cls):
|
def get_image(cls):
|
||||||
raw_output = cls.openstack('image list -f value -c ID')
|
raw_output = cls.openstack('image list -f value -c ID')
|
||||||
ray = raw_output.split('\n')
|
ray = raw_output.split('\n')
|
||||||
idx = int(len(ray)/2)
|
idx = int(len(ray) / 2)
|
||||||
return ray[idx]
|
return ray[idx]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@ -49,7 +49,7 @@ class ServerTests(test.TestCase):
|
|||||||
except exceptions.CommandFailed:
|
except exceptions.CommandFailed:
|
||||||
return ''
|
return ''
|
||||||
ray = raw_output.split('\n')
|
ray = raw_output.split('\n')
|
||||||
idx = int(len(ray)/2)
|
idx = int(len(ray) / 2)
|
||||||
return ' --nic net-id=' + ray[idx]
|
return ' --nic net-id=' + ray[idx]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -131,7 +131,7 @@ class GroupTests(test_identity.IdentityTests):
|
|||||||
'%(group)s %(user)s' % {'group_domain': self.domain_name,
|
'%(group)s %(user)s' % {'group_domain': self.domain_name,
|
||||||
'user_domain': self.domain_name,
|
'user_domain': self.domain_name,
|
||||||
'group': group_name,
|
'group': group_name,
|
||||||
'user': username})
|
'user': username})
|
||||||
self.assertOutput(
|
self.assertOutput(
|
||||||
'%(user)s in group %(group)s\n' % {'user': username,
|
'%(user)s in group %(group)s\n' % {'user': username,
|
||||||
'group': group_name},
|
'group': group_name},
|
||||||
|
@ -30,7 +30,8 @@ class Timing(command.Lister):
|
|||||||
for url, td in self.app.timing_data:
|
for url, td in self.app.timing_data:
|
||||||
# NOTE(dtroyer): Take the long way here because total_seconds()
|
# NOTE(dtroyer): Take the long way here because total_seconds()
|
||||||
# was added in py27.
|
# was added in py27.
|
||||||
sec = (td.microseconds + (td.seconds + td.days*86400) * 1e6) / 1e6
|
sec = (td.microseconds + (td.seconds + td.days *
|
||||||
|
86400) * 1e6) / 1e6
|
||||||
total += sec
|
total += sec
|
||||||
results.append((url, sec))
|
results.append((url, sec))
|
||||||
results.append(('Total', total))
|
results.append(('Total', total))
|
||||||
|
@ -1206,7 +1206,7 @@ class RescueServer(command.ShowOne):
|
|||||||
_, body = utils.find_resource(
|
_, body = utils.find_resource(
|
||||||
compute_client.servers,
|
compute_client.servers,
|
||||||
parsed_args.server,
|
parsed_args.server,
|
||||||
).rescue()
|
).rescue()
|
||||||
return zip(*sorted(six.iteritems(body)))
|
return zip(*sorted(six.iteritems(body)))
|
||||||
|
|
||||||
|
|
||||||
|
3
tox.ini
3
tox.ini
@ -38,3 +38,6 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasen
|
|||||||
[flake8]
|
[flake8]
|
||||||
show-source = True
|
show-source = True
|
||||||
exclude = .git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools
|
exclude = .git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools
|
||||||
|
# If 'ignore' is not set there are default errors and warnings that are set
|
||||||
|
# Doc: http://flake8.readthedocs.org/en/latest/config.html#default
|
||||||
|
ignore = __
|
Loading…
Reference in New Issue
Block a user