|
32 | 32 | ensure_writable,
|
33 | 33 | )
|
34 | 34 |
|
35 |
| -_USERNS = None |
| 35 | +_USERNS = None # type: Optional[bool] |
36 | 36 | _SINGULARITY_VERSION = ""
|
37 | 37 |
|
38 | 38 |
|
@@ -273,8 +273,9 @@ def get_from_requirements(
|
273 | 273 | return os.path.abspath(cast(str, r["dockerImageId"]))
|
274 | 274 |
|
275 | 275 | @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: |
278 | 279 | runtime.append("--bind")
|
279 | 280 | runtime.append(
|
280 | 281 | "{}:{}:{}".format(
|
@@ -302,11 +303,11 @@ def add_file_or_directory_volume(
|
302 | 303 |
|
303 | 304 | def add_writable_file_volume(
|
304 | 305 | 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: |
310 | 311 | if host_outdir_tgt is not None:
|
311 | 312 | # workaround for lack of overlapping mounts in Singularity
|
312 | 313 | # revert to daa923d5b0be3819b6ed0e6440e7193e65141052
|
@@ -336,11 +337,11 @@ def add_writable_file_volume(
|
336 | 337 |
|
337 | 338 | def add_writable_directory_volume(
|
338 | 339 | 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: |
344 | 345 | if volume.resolved.startswith("_:"):
|
345 | 346 | if host_outdir_tgt is not None:
|
346 | 347 | new_dir = host_outdir_tgt
|
|
0 commit comments