mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-11 12:02:56 +00:00
black style tweaks: manually added commas etc to tweak formatting
This commit is contained in:

committed by
Erik Sundell

parent
fe3968efe0
commit
a582c24e19
@@ -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
|
||||||
|
@@ -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()
|
||||||
|
@@ -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
|
||||||
|
@@ -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")
|
||||||
|
|
||||||
|
@@ -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)
|
||||||
|
@@ -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}
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user