Skip to content

Commit 1ccfab8

Browse files
committed
allow for monkeypatching _inspect_singularity_image
1 parent fc682c1 commit 1ccfab8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

cwltool/singularity.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from subprocess import check_call, check_output, run # nosec
1212
from typing import cast
1313

14+
from mypy_extensions import mypyc_attr
1415
from schema_salad.sourceline import SourceLine
1516
from spython.main import Client
1617
from spython.main.parse.parsers.docker import DockerParser
@@ -146,6 +147,7 @@ def _normalize_sif_id(string: str) -> str:
146147
return string.replace("/", "_") + ".sif"
147148

148149

150+
@mypyc_attr(allow_interpreted_subclasses=True)
149151
def _inspect_singularity_image(path: str) -> bool:
150152
"""Inspect singularity image to be sure it is not an empty directory."""
151153
cmd = [

tests/test_singularity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
import json
44
import shutil
55
import subprocess
6+
from collections.abc import Callable
67
from pathlib import Path
78
from typing import Any
8-
from collections.abc import Callable
99

1010
import pytest
1111
from mypy_extensions import KwArg, VarArg

0 commit comments

Comments
 (0)