Skip to content

Commit 86ca045

Browse files
committed
Use fetcher.supported_schemes() instead of hardcoded list
1 parent fc66b13 commit 86ca045

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

cwl_utils/parser/cwl_v1_0.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,10 @@ def expand_url(
317317
split = urlsplit(url)
318318

319319
if (
320-
(bool(split.scheme) and split.scheme in ["http", "https", "file"])
320+
(
321+
bool(split.scheme)
322+
and split.scheme in loadingOptions.fetcher.supported_schemes()
323+
)
321324
or url.startswith("$(")
322325
or url.startswith("${")
323326
):

cwl_utils/parser/cwl_v1_1.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,10 @@ def expand_url(
317317
split = urlsplit(url)
318318

319319
if (
320-
(bool(split.scheme) and split.scheme in ["http", "https", "file"])
320+
(
321+
bool(split.scheme)
322+
and split.scheme in loadingOptions.fetcher.supported_schemes()
323+
)
321324
or url.startswith("$(")
322325
or url.startswith("${")
323326
):

cwl_utils/parser/cwl_v1_2.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,10 @@ def expand_url(
317317
split = urlsplit(url)
318318

319319
if (
320-
(bool(split.scheme) and split.scheme in ["http", "https", "file"])
320+
(
321+
bool(split.scheme)
322+
and split.scheme in loadingOptions.fetcher.supported_schemes()
323+
)
321324
or url.startswith("$(")
322325
or url.startswith("${")
323326
):

0 commit comments

Comments
 (0)