Skip to content

Commit db787f1

Browse files
committed
skip $import: #local-ref
1 parent e2a05df commit db787f1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Diff for: cwlupgrader/main.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,14 @@ def process_imports(
195195
if isinstance(document, CommentedMap):
196196
for key, value in document.items():
197197
if key == "$import":
198-
if value not in imports:
198+
if value not in imports and not value.startswith("#"):
199+
with SourceLine(document, key, Exception):
200+
import_doc = load_cwl_document(
201+
Path(document.lc.filename).parent / value
202+
)
199203
write_cwl_document(
200204
updater(
201-
load_cwl_document(
202-
Path(document.lc.filename).parent / value
203-
),
205+
import_doc,
204206
outdir,
205207
),
206208
Path(value).name,

0 commit comments

Comments
 (0)