Skip to content

Commit 3d7a26b

Browse files
author
Tom Cocozzello
committed
Defaults are ignored with flake8
If “ignore” is not set under flake8 in the tox.ini file there there are defaults set to be ignored. The depended patch fixes many of the problems. Change-Id: Ieed2fe1c4654e201d3fe6d40ef93e247ee736f8b Doc: http://flake8.readthedocs.org/en/latest/config.html#default Depends-On: I935ab48e7c5bac5f88ecdb3a05f73fb44fc9f41d Closes-Bug: #1548910
1 parent f49f0fe commit 3d7a26b

5 files changed

Lines changed: 10 additions & 6 deletions

File tree

functional/tests/compute/v2/test_server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ class ServerTests(test.TestCase):
3232
def get_flavor(cls):
3333
raw_output = cls.openstack('flavor list -f value -c ID')
3434
ray = raw_output.split('\n')
35-
idx = int(len(ray)/2)
35+
idx = int(len(ray) / 2)
3636
return ray[idx]
3737

3838
@classmethod
3939
def get_image(cls):
4040
raw_output = cls.openstack('image list -f value -c ID')
4141
ray = raw_output.split('\n')
42-
idx = int(len(ray)/2)
42+
idx = int(len(ray) / 2)
4343
return ray[idx]
4444

4545
@classmethod
@@ -49,7 +49,7 @@ def get_network(cls):
4949
except exceptions.CommandFailed:
5050
return ''
5151
ray = raw_output.split('\n')
52-
idx = int(len(ray)/2)
52+
idx = int(len(ray) / 2)
5353
return ' --nic net-id=' + ray[idx]
5454

5555
@classmethod

functional/tests/identity/v3/test_group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def test_group_contains_user(self):
131131
'%(group)s %(user)s' % {'group_domain': self.domain_name,
132132
'user_domain': self.domain_name,
133133
'group': group_name,
134-
'user': username})
134+
'user': username})
135135
self.assertOutput(
136136
'%(user)s in group %(group)s\n' % {'user': username,
137137
'group': group_name},

openstackclient/common/timing.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ def take_action(self, parsed_args):
3030
for url, td in self.app.timing_data:
3131
# NOTE(dtroyer): Take the long way here because total_seconds()
3232
# was added in py27.
33-
sec = (td.microseconds + (td.seconds + td.days*86400) * 1e6) / 1e6
33+
sec = (td.microseconds + (td.seconds + td.days *
34+
86400) * 1e6) / 1e6
3435
total += sec
3536
results.append((url, sec))
3637
results.append(('Total', total))

openstackclient/compute/v2/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1206,7 +1206,7 @@ def take_action(self, parsed_args):
12061206
_, body = utils.find_resource(
12071207
compute_client.servers,
12081208
parsed_args.server,
1209-
).rescue()
1209+
).rescue()
12101210
return zip(*sorted(six.iteritems(body)))
12111211

12121212

tox.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,6 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasen
3636
[flake8]
3737
show-source = True
3838
exclude = .git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools
39+
# If 'ignore' is not set there are default errors and warnings that are set
40+
# Doc: http://flake8.readthedocs.org/en/latest/config.html#default
41+
ignore = __

0 commit comments

Comments
 (0)