Skip to content

Commit dfa602b

Browse files
Merge pull request #1201 from allmightyspiff/toxFixes
fixing new flask8 errors that show up out of nowhere
2 parents 31cf401 + d5b544a commit dfa602b

File tree

6 files changed

+17
-19
lines changed

6 files changed

+17
-19
lines changed

SoftLayer/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
__author__ = 'SoftLayer Technologies, Inc.'
3030
__license__ = 'MIT'
3131
__copyright__ = 'Copyright 2016 SoftLayer Technologies, Inc.'
32-
__all__ = [
32+
__all__ = [ # noqa: F405
3333
'BaseClient',
3434
'create_client_from_env',
3535
'Client',

SoftLayer/shell/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def cli(ctx, env):
8181
return
8282
except ShellExit:
8383
return
84-
except Exception as ex:
84+
except Exception:
8585
env.vars['last_exit_code'] = 1
8686
traceback.print_exc(file=sys.stderr)
8787

SoftLayer/testing/xmlrpc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def do_POST(self):
8383
allow_none=True,
8484
methodresponse=True)
8585
self.wfile.write(response_body.encode('utf-8'))
86-
except Exception as ex:
86+
except Exception:
8787
self.send_response(500)
8888
logging.exception("Error while handling request")
8989

tests/CLI/helper_tests.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -154,29 +154,29 @@ def test_sort(self):
154154

155155
class FormattedListTests(testing.TestCase):
156156
def test_init(self):
157-
l = formatting.listing([1, 'two'], separator=':')
158-
self.assertEqual([1, 'two'], list(l))
159-
self.assertEqual(':', l.separator)
157+
listing = formatting.listing([1, 'two'], separator=':')
158+
self.assertEqual([1, 'two'], list(listing))
159+
self.assertEqual(':', listing.separator)
160160

161-
l = formatting.listing([])
162-
self.assertEqual(',', l.separator)
161+
listing = formatting.listing([])
162+
self.assertEqual(',', listing.separator)
163163

164164
def test_to_python(self):
165-
l = formatting.listing([1, 'two'])
166-
result = l.to_python()
165+
listing = formatting.listing([1, 'two'])
166+
result = listing.to_python()
167167
self.assertEqual([1, 'two'], result)
168168

169-
l = formatting.listing(x for x in [1, 'two'])
170-
result = l.to_python()
169+
listing = formatting.listing(x for x in [1, 'two'])
170+
result = listing.to_python()
171171
self.assertEqual([1, 'two'], result)
172172

173173
def test_str(self):
174-
l = formatting.listing([1, 'two'])
175-
result = str(l)
174+
listing = formatting.listing([1, 'two'])
175+
result = str(listing)
176176
self.assertEqual('1,two', result)
177177

178-
l = formatting.listing((x for x in [1, 'two']), separator=':')
179-
result = str(l)
178+
listing = formatting.listing((x for x in [1, 'two']), separator=':')
179+
result = str(listing)
180180
self.assertEqual('1:two', result)
181181

182182

tests/managers/hardware_tests.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,7 @@ def test_cancel_hardware(self):
281281

282282
def test_cancel_hardware_no_billing_item(self):
283283
mock = self.set_mock('SoftLayer_Hardware_Server', 'getObject')
284-
mock.return_value = {'id': 987, 'openCancellationTicket': {'id': 1234},
285-
'openCancellationTicket': {'id': 1234}}
284+
mock.return_value = {'id': 987, 'openCancellationTicket': {'id': 1234}}
286285

287286
ex = self.assertRaises(SoftLayer.SoftLayerError,
288287
self.hardware.cancel_hardware,

tests/managers/vs/vs_capacity_tests.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ def test_create_guest(self):
132132
'maxMemory': None,
133133
'hostname': 'A1538172419',
134134
'domain': 'test.com',
135-
'localDiskFlag': None,
136135
'hourlyBillingFlag': True,
137136
'supplementalCreateObjectOptions': {
138137
'bootMode': None,

0 commit comments

Comments
 (0)