Skip to content

Commit f24827a

Browse files
author
Brian Flores
committed
fixed tox errors
1 parent d376545 commit f24827a

File tree

13 files changed

+28
-32
lines changed

13 files changed

+28
-32
lines changed

SoftLayer/CLI/core.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ def get_latest_version():
5252
return latest
5353

5454

55-
CONTEXT_SETTINGS = dict(
56-
help_option_names=['--help', '-h'],
57-
auto_envvar_prefix='SLCLI',
58-
max_content_width=999
59-
)
55+
CONTEXT_SETTINGS = {
56+
"help_option_names": ['--help', '-h'],
57+
"auto_envvar_prefix": 'SLCLI',
58+
"max_content_width": 999
59+
}
6060

6161

6262
def get_version_message(ctx, param, value):

SoftLayer/CLI/hardware/reload.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
@click.command(cls=SoftLayer.CLI.command.SLCommand, )
1414
@click.argument('identifier')
1515
@click.option('--postinstall', '-i',
16-
help=("Post-install script to download (Only HTTPS executes, HTTP leaves file in /root"))
16+
help="Post-install script to download (Only HTTPS executes, HTTP leaves file in /root")
1717
@helpers.multi_option('--key', '-k', help="SSH keys to add to the root user")
1818
@click.option('--lvm', '-l', is_flag=True, default=False, show_default=True,
1919
help="A flag indicating that the provision should use LVM for all logical drives.")

SoftLayer/CLI/order/place.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
@click.option('--billing', type=click.Choice(['hourly', 'monthly']), default='hourly', show_default=True,
2929
help="Billing rate")
3030
@click.option('--complex-type',
31-
help=("The complex type of the order. Starts with 'SoftLayer_Container_Product_Order'."))
31+
help="The complex type of the order. Starts with 'SoftLayer_Container_Product_Order'.")
3232
@click.option('--extras',
3333
help="JSON string denoting extra data that needs to be sent with the order")
3434
@click.argument('order_items', nargs=-1)

SoftLayer/CLI/order/quote.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def _parse_create_args(client, args):
7575
@click.option('--quantity', type=int, default=None,
7676
help="The quantity of the item being ordered if different from quoted value")
7777
@click.option('--complex-type', default='SoftLayer_Container_Product_Order_Hardware_Server', show_default=True,
78-
help=("The complex type of the order. Starts with 'SoftLayer_Container_Product_Order'."))
78+
help="The complex type of the order. Starts with 'SoftLayer_Container_Product_Order'.")
7979
@click.option('--userdata', '-u', help="User defined metadata string")
8080
@click.option('--userfile', '-F', type=click.Path(exists=True, readable=True, resolve_path=True),
8181
help="Read userdata from file")

SoftLayer/CLI/storage_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def _format_name(obj):
6565

6666
return name
6767
else:
68-
raise Exception('Unknown type %s' % obj['type'])
68+
raise ValueError('Unknown type %s' % obj['type'])
6969

7070

7171
COLUMNS = [

SoftLayer/CLI/virt/create.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,9 @@ def _parse_create_args(client, args):
199199
@click.option('--router-private', type=click.INT,
200200
help="The ID of the private ROUTER on which you want the virtual server placed")
201201
@helpers.multi_option('--public-security-group', '-S',
202-
help=('Security group ID to associate with the public interface'))
202+
help='Security group ID to associate with the public interface')
203203
@helpers.multi_option('--private-security-group', '-s',
204-
help=('Security group ID to associate with the private interface'))
204+
help='Security group ID to associate with the private interface')
205205
@click.option('--wait', type=click.INT,
206206
help="Wait until VS is finished provisioning for up to X seconds before returning")
207207
@click.option('--placementgroup',

SoftLayer/managers/block.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ def list_block_volumes(self, datacenter=None, username=None, storage_type=None,
5252

5353
_filter = utils.NestedDict(kwargs.get('filter') or {})
5454

55-
_filter['iscsiNetworkStorage']['serviceResource']['type']['type'] = \
56-
(utils.query_filter('!~ ISCSI'))
55+
_filter['iscsiNetworkStorage']['serviceResource']['type']['type'] = utils.query_filter('!~ ISCSI')
5756

5857
_filter['iscsiNetworkStorage']['storageType']['keyName'] = (
5958
utils.query_filter('*BLOCK_STORAGE*'))
@@ -63,15 +62,14 @@ def list_block_volumes(self, datacenter=None, username=None, storage_type=None,
6362

6463
if datacenter:
6564
_filter['iscsiNetworkStorage']['serviceResource']['datacenter'][
66-
'name'] = (utils.query_filter(datacenter))
65+
'name'] = utils.query_filter(datacenter)
6766

6867
if username:
69-
_filter['iscsiNetworkStorage']['username'] = \
70-
(utils.query_filter(username))
68+
_filter['iscsiNetworkStorage']['username'] = utils.query_filter(username)
7169

7270
if order:
7371
_filter['iscsiNetworkStorage']['billingItem']['orderItem'][
74-
'order']['id'] = (utils.query_filter(order))
72+
'order']['id'] = utils.query_filter(order)
7573

7674
kwargs['filter'] = _filter.to_dict()
7775
return self.client.call('Account', 'getIscsiNetworkStorage', iter=True, **kwargs)

SoftLayer/managers/dedicated_host.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def get_host(self, host_id, **kwargs):
233233
234234
"""
235235
if 'mask' not in kwargs:
236-
kwargs['mask'] = ('''
236+
kwargs['mask'] = '''
237237
id,
238238
name,
239239
cpuCount,
@@ -272,7 +272,7 @@ def get_host(self, host_id, **kwargs):
272272
uuid
273273
],
274274
guestCount
275-
''')
275+
'''
276276

277277
return self.host.getObject(id=host_id, **kwargs)
278278

SoftLayer/managers/file.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ def list_file_volumes(self, datacenter=None, username=None, storage_type=None, o
4848

4949
_filter = utils.NestedDict(kwargs.get('filter') or {})
5050

51-
_filter['nasNetworkStorage']['serviceResource']['type']['type'] = \
52-
(utils.query_filter('!~ NAS'))
51+
_filter['nasNetworkStorage']['serviceResource']['type']['type'] = utils.query_filter('!~ NAS')
5352

5453
_filter['nasNetworkStorage']['storageType']['keyName'] = (
5554
utils.query_filter('*FILE_STORAGE*'))
@@ -59,15 +58,14 @@ def list_file_volumes(self, datacenter=None, username=None, storage_type=None, o
5958

6059
if datacenter:
6160
_filter['nasNetworkStorage']['serviceResource']['datacenter'][
62-
'name'] = (utils.query_filter(datacenter))
61+
'name'] = utils.query_filter(datacenter)
6362

6463
if username:
65-
_filter['nasNetworkStorage']['username'] = \
66-
(utils.query_filter(username))
64+
_filter['nasNetworkStorage']['username'] = utils.query_filter(username)
6765

6866
if order:
6967
_filter['nasNetworkStorage']['billingItem']['orderItem'][
70-
'order']['id'] = (utils.query_filter(order))
68+
'order']['id'] = utils.query_filter(order)
7169

7270
kwargs['filter'] = _filter.to_dict()
7371
return self.client.call('Account', 'getNasNetworkStorage', iter=True, **kwargs)

SoftLayer/managers/firewall.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,12 @@ def _get_fwl_port_speed(self, server_id, is_virt=True):
173173

174174
fwl_port_speed = 0
175175
if is_virt:
176-
mask = ('primaryNetworkComponent[maxSpeed]')
176+
mask = 'primaryNetworkComponent[maxSpeed]'
177177
svc = self.client['Virtual_Guest']
178178
primary = svc.getObject(mask=mask, id=server_id)
179179
fwl_port_speed = primary['primaryNetworkComponent']['maxSpeed']
180180
else:
181-
mask = ('id,maxSpeed,networkComponentGroup.networkComponents')
181+
mask = 'id,maxSpeed,networkComponentGroup.networkComponents'
182182
svc = self.client['Hardware_Server']
183183
network_components = svc.getFrontendNetworkComponents(
184184
mask=mask, id=server_id)

0 commit comments

Comments
 (0)