Skip to content

Commit 9f9867a

Browse files
committed
freshen cwltool/singularity.py
1 parent 9cbe137 commit 9f9867a

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

cwltool/singularity.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
ensure_writable,
3333
)
3434

35-
_USERNS = None
35+
_USERNS = None # type: Optional[bool]
3636
_SINGULARITY_VERSION = ""
3737

3838

@@ -273,8 +273,9 @@ def get_from_requirements(
273273
return os.path.abspath(cast(str, r["dockerImageId"]))
274274

275275
@staticmethod
276-
def append_volume(runtime, source, target, writable=False):
277-
# type: (List[str], str, str, bool) -> None
276+
def append_volume(
277+
runtime: List[str], source: str, target: str, writable: bool = False
278+
) -> None:
278279
runtime.append("--bind")
279280
runtime.append(
280281
"{}:{}:{}".format(
@@ -302,11 +303,11 @@ def add_file_or_directory_volume(
302303

303304
def add_writable_file_volume(
304305
self,
305-
runtime, # type: List[str]
306-
volume, # type: MapperEnt
307-
host_outdir_tgt, # type: Optional[str]
308-
tmpdir_prefix, # type: str
309-
): # type: (...) -> None
306+
runtime: List[str],
307+
volume: MapperEnt,
308+
host_outdir_tgt: Optional[str],
309+
tmpdir_prefix: str,
310+
) -> None:
310311
if host_outdir_tgt is not None:
311312
# workaround for lack of overlapping mounts in Singularity
312313
# revert to daa923d5b0be3819b6ed0e6440e7193e65141052
@@ -336,11 +337,11 @@ def add_writable_file_volume(
336337

337338
def add_writable_directory_volume(
338339
self,
339-
runtime, # type: List[str]
340-
volume, # type: MapperEnt
341-
host_outdir_tgt, # type: Optional[str]
342-
tmpdir_prefix, # type: str
343-
): # type: (...) -> None
340+
runtime: List[str],
341+
volume: MapperEnt,
342+
host_outdir_tgt: Optional[str],
343+
tmpdir_prefix: str,
344+
) -> None:
344345
if volume.resolved.startswith("_:"):
345346
if host_outdir_tgt is not None:
346347
new_dir = host_outdir_tgt

0 commit comments

Comments
 (0)