Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion neurodocker/cli/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class OptionEatAll(click.Option):

def __init__(self, *args, **kwargs):
nargs = kwargs.pop("nargs", -1)
assert nargs == -1, "nargs, if set, must be -1 not {}".format(nargs)
assert nargs == -1, f"nargs, if set, must be -1 not {nargs}"
super(OptionEatAll, self).__init__(*args, **kwargs)
if self.type is click.STRING:
raise ValueError(
Expand Down
4 changes: 2 additions & 2 deletions neurodocker/reproenv/renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ def entrypoint(self, args: list[str]) -> DockerRenderer:
def from_(self, base_image: str, as_: str = None) -> DockerRenderer:
"""Add a Dockerfile `FROM` instruction."""
if as_ is None:
s = "FROM " + base_image
s = f"FROM {base_image}"
Comment thread
DimitriPapadopoulos marked this conversation as resolved.
else:
s = f"FROM {base_image} AS {as_}"
self._parts.append(s)
Expand Down Expand Up @@ -573,7 +573,7 @@ def user(self, user: str) -> DockerRenderer:
@_log_instruction
def workdir(self, path: PathType) -> DockerRenderer:
"""Add a Dockerfile `WORKDIR` instruction."""
self._parts.append("WORKDIR " + str(path))
self._parts.append(f"WORKDIR {path}")
Comment thread
DimitriPapadopoulos marked this conversation as resolved.
return self


Expand Down
2 changes: 1 addition & 1 deletion neurodocker/reproenv/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def build_docker_image(context: Path, remove=False) -> Generator[str, None, None
df = context / "Dockerfile"
if not df.exists():
raise FileNotFoundError(f"Dockerfile not found: {df}")
tag = "reproenv-pytest-" + uuid.uuid4().hex
tag = f"reproenv-pytest-{uuid.uuid4().hex}"
cmd: list[str] = ["docker", "build", "--tag", tag, str(context)]
try:
_ = subprocess.check_output(cmd, cwd=context)
Expand Down
Loading