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",
"req",
"-new",
"-newkey",
"rsa:2048",
"-days",
"365",
"-newkey=rsa:2048",
"-days=365",
"-nodes",
"-x509",
"-subj",
"/C=XX/ST=XX/L=XX/O=generated/CN=generated",
"-keyout",
pem_file,
"-out",
pem_file,
"-subj=/C=XX/ST=XX/L=XX/O=generated/CN=generated",
f"-keyout={pem_file}",
f"-out={pem_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.
"""
container = TrackedContainer(
docker_client, image_name, detach=True, ports={"8888/tcp": 8888}
docker_client,
image_name,
detach=True,
ports={"8888/tcp": 8888},
)
yield container
container.remove()

View File

@@ -15,7 +15,9 @@ fig, ax = plt.subplots()
ax.plot(t, s)
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()
# 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(
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:
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:
VERSION_PREFIX = "Version: "
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]
assert version_line.startswith(VERSION_PREFIX)

View File

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