Skip to content

Commit cb39db5

Browse files
J JayasilanJ Jayasilan
authored andcommitted
Few tox analysis specific changes
1 parent 56c4ebf commit cb39db5

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

SoftLayer/CLI/bandwidth/pools_create.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,18 @@
2222
}
2323

2424
regions = ['SJC/DAL/WDC/TOR/MON', 'AMS/LON/MAD/PAR', 'SNG/HKG/OSA/TOK', 'SYD', 'MEX', 'SAO', 'CHE', 'MIL', 'SEO', 'FRA']
25-
help_stmt = "Ex: 'HKG' or 'SNG/HKG/OSA/TOK'"
25+
HELP_STMT = "Ex: 'HKG' or 'SNG/HKG/OSA/TOK'"
2626

27-
def check_region_param(ctx,param,value):
27+
28+
def check_region_param(ctx, param, value):
2829
"""Check if provided region is region group or part of region"""
29-
#:params string value: Region or Region-Groups
30+
31+
# :params string value: Region or Region-Groups
3032
# return string Region-Groups
3133

34+
_ = [ctx, param]
3235
region_group = None
33-
for key in location_groups.keys():
36+
for key in location_groups:
3437
if value in key or value is key:
3538
region_group = key
3639
else:
@@ -39,13 +42,15 @@ def check_region_param(ctx,param,value):
3942
if region_group:
4043
return region_group
4144
else:
42-
raise click.BadParameter(f"{value} is not a region or part of any region. \nAvailable Choices: \033[1;32m{regions}")
45+
raise click.BadParameter(f"{value} is not a region or part of any \
46+
region. \nAvailable Choices: \033[1;32m{regions}")
47+
4348

4449
@click.command(cls=SLCommand)
4550
@click.option('--name', required=True, help="Pool name")
4651
@click.option('--region', required=True,
4752
help=f"Choose Region/Region-Group {regions}", callback=check_region_param)
48-
@click.help_option('--help','-h',help=f"Specify Region or Region group - \033[1;32m{help_stmt}")
53+
@click.help_option('--help', '-h', help=f"Specify Region or Region group - \033[1;32m{HELP_STMT}")
4954
@environment.pass_env
5055
def cli(env, name, region):
5156
"""Create bandwidth pool."""

0 commit comments

Comments
 (0)