black style tweaks: manually added commas etc to tweak formatting

This commit is contained in:
Erik Sundell
2021-06-28 13:03:40 +02:00
committed by Erik Sundell
parent fe3968efe0
commit a582c24e19
6 changed files with 28 additions and 21 deletions

View File

@@ -45,18 +45,13 @@ distinguished_name = req_distinguished_name
"openssl", "openssl",
"req", "req",
"-new", "-new",
"-newkey", "-newkey=rsa:2048",
"rsa:2048", "-days=365",
"-days",
"365",
"-nodes", "-nodes",
"-x509", "-x509",
"-subj", "-subj=/C=XX/ST=XX/L=XX/O=generated/CN=generated",
"/C=XX/ST=XX/L=XX/O=generated/CN=generated", f"-keyout={pem_file}",
"-keyout", f"-out={pem_file}",
pem_file,
"-out",
pem_file,
] ]
) )
# Restrict access to the file # Restrict access to the file

View File

@@ -97,7 +97,10 @@ def container(docker_client, image_name):
Yields the container instance and kills it when the caller is done with it. Yields the container instance and kills it when the caller is done with it.
""" """
container = TrackedContainer( container = TrackedContainer(
docker_client, image_name, detach=True, ports={"8888/tcp": 8888} docker_client,
image_name,
detach=True,
ports={"8888/tcp": 8888},
) )
yield container yield container
container.remove() container.remove()

View File

@@ -15,7 +15,9 @@ fig, ax = plt.subplots()
ax.plot(t, s) ax.plot(t, s)
ax.set( ax.set(
xlabel="time (s)", ylabel="voltage (mV)", title="About as simple as it gets, folks" xlabel="time (s)",
ylabel="voltage (mV)",
title="About as simple as it gets, folks",
) )
ax.grid() ax.grid()
# Note that the test can be run headless by checking if an image is produced # Note that the test can be run headless by checking if an image is produced

View File

@@ -20,7 +20,10 @@ MARKDOWN_LINE_BREAK = "<br />"
def append_build_history_line( def append_build_history_line(
short_image_name: str, owner: str, wiki_path: str, all_tags: List[str] short_image_name: str,
owner: str,
wiki_path: str,
all_tags: List[str],
) -> None: ) -> None:
logger.info("Appending build history line") logger.info("Appending build history line")

View File

@@ -25,7 +25,9 @@ def _get_env_variable(container, variable: str) -> str:
def _get_pip_package_version(container, package: str) -> str: def _get_pip_package_version(container, package: str) -> str:
VERSION_PREFIX = "Version: " VERSION_PREFIX = "Version: "
package_info = DockerRunner.run_simple_command( package_info = DockerRunner.run_simple_command(
container, cmd=f"pip show {package}", print_result=False container,
cmd=f"pip show {package}",
print_result=False,
) )
version_line = package_info.split("\n")[1] version_line = package_info.split("\n")[1]
assert version_line.startswith(VERSION_PREFIX) assert version_line.startswith(VERSION_PREFIX)

View File

@@ -143,10 +143,12 @@ class CondaPackageHelper:
continue continue
current = min(inst_vs, key=CondaPackageHelper.semantic_cmp) current = min(inst_vs, key=CondaPackageHelper.semantic_cmp)
newest = avail_vs[-1] newest = avail_vs[-1]
if avail_vs and current != newest: if (
if CondaPackageHelper.semantic_cmp( avail_vs
current and current != newest
) < CondaPackageHelper.semantic_cmp(newest): and CondaPackageHelper.semantic_cmp(current)
< CondaPackageHelper.semantic_cmp(newest)
):
self.comparison.append( self.comparison.append(
{"Package": pkg, "Current": current, "Newest": newest} {"Package": pkg, "Current": current, "Newest": newest}
) )