Skip to content

Commit c86a522

Browse files
committed
cleanups
1 parent 22e3d48 commit c86a522

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

cwltool/docker.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,11 @@ def append_volume(
251251
runtime: List[str], source: str, target: str, writable: bool = False
252252
) -> None:
253253
"""Add binding arguments to the runtime list."""
254-
if os.path.isfile(source) and target.endswith(os.path.basename(source)) and not writable:
254+
if (
255+
os.path.isfile(source)
256+
and target.endswith(os.path.basename(source))
257+
and not writable
258+
):
255259
source = os.path.dirname(source)
256260
target = os.path.dirname(target)
257261
options = [

cwltool/singularity.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,12 +280,16 @@ def get_from_requirements(
280280

281281
@staticmethod
282282
def append_volume(
283-
runtime: List[str], source: str, target: str, writable: bool = False
283+
runtime: List[str], source: str, target: str, writable: bool = False
284284
) -> None:
285285
src = docker_windows_path_adjust(source)
286286
dst = docker_windows_path_adjust(target)
287287
writable = "rw" if writable else "ro"
288-
if os.path.isfile(src) and dst.endswith(os.path.basename(src)) and writable == 'ro':
288+
if (
289+
os.path.isfile(src)
290+
and dst.endswith(os.path.basename(src))
291+
and writable == "ro"
292+
):
289293
src = os.path.dirname(src)
290294
dst = os.path.dirname(dst)
291295
bind_arg = f"--bind={src}:{dst}:{writable}"
@@ -404,7 +408,8 @@ def create_runtime(
404408
)
405409
)
406410
else:
407-
runtime.append("--bind={}:{}:rw".format(
411+
runtime.append(
412+
"--bind={}:{}:rw".format(
408413
docker_windows_path_adjust(os.path.realpath(self.outdir)),
409414
self.builder.outdir,
410415
)

0 commit comments

Comments
 (0)