Fix lint errors #523

Merged
telackey merged 3 commits from dboreham/fix-lint-errors into main 2023-09-04 19:00:24 +00:00
3 changed files with 6 additions and 6 deletions
Showing only changes of commit 3e1d98ab83 - Show all commits

View File

@ -141,7 +141,7 @@ def exec_operation(ctx, extra_args):
try:
ctx.obj.docker.compose.execute(service_name, command_to_exec, envs=container_exec_env)
except DockerException:
print(f"container command returned error exit status")
print("container command returned error exit status")
def logs_operation(ctx, tail: int, follow: bool, extra_args: str):

View File

@ -41,7 +41,7 @@ def _get_ports(stack):
for svc_name, svc in parsed_pod_file["services"].items():
if "ports" in svc:
# Ports can appear as strings or numbers. We normalize them as strings.
ports[svc_name] = [ str(x) for x in svc["ports"] ]
ports[svc_name] = [str(x) for x in svc["ports"]]
return ports
@ -178,7 +178,7 @@ def _get_mapped_ports(stack: str, map_recipe: str):
ports_array = ports[service]
for x in range(0, len(ports_array)):
orig_port = ports_array[x]
random_port = random.randint(20000,50000) # Beware: we're relying on luck to not collide
random_port = random.randint(20000, 50000) # Beware: we're relying on luck to not collide
if map_recipe == "any-variable-random":
# This is the default so take no action
pass
@ -202,11 +202,11 @@ def _get_mapped_ports(stack: str, map_recipe: str):
return ports
@click.command()
@click.option("--output", required=True, help="Write yaml spec file here")
@click.option("--map-ports-to-host", required=False,
help="Map ports to the host as one of: any-variable-random (default), localhost-same, any-same, localhost-fixed-random, any-fixed-random")
help="Map ports to the host as one of: any-variable-random (default), "
"localhost-same, any-same, localhost-fixed-random, any-fixed-random")
@click.pass_context
def init(ctx, output, map_ports_to_host):
yaml = get_yaml()

View File

@ -118,7 +118,7 @@ def process_repo(verbose, quiet, dry_run, pull, check_only, git_ssh, dev_root_pa
origin = git_repo.remotes.origin
origin.pull(progress=None if quiet else GitProgress())
else:
print(f"skipping pull because this repo checked out a tag")
print("skipping pull because this repo checked out a tag")
else:
print("(git pull skipped)")
if not is_present: