Skip to content

Commit 8a13b0b

Browse files
author
Peter Amstutz
committed
Add nameroot and nameext to File objects in output, for use by
expressions/secondaryFiles. Mypy fix.
1 parent 716e07f commit 8a13b0b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

cwltool/draft2tool.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,8 @@ def collect_output(self, schema, builder, outdir, fs_access, compute_checksum=Tr
582582
r.extend([{"location": g,
583583
"path": fs_access.join(builder.outdir, g[len(prefix[0])+1:]),
584584
"basename": os.path.basename(g),
585+
"nameroot": os.path.splitext(os.path.basename(g))[0],
586+
"nameext": os.path.splitext(os.path.basename(g))[1],
585587
"class": "File" if fs_access.isfile(g) else "Directory"}
586588
for g in fs_access.glob(fs_access.join(outdir, gb))])
587589
except (OSError, IOError) as e:

cwltool/job.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def __init__(self): # type: () -> None
132132
self.name = None # type: Text
133133
self.command_line = None # type: List[Text]
134134
self.pathmapper = None # type: PathMapper
135-
self.make_pathmapper = None # type: Callable[[List[Any], Text, **Any], PathMapper]
135+
self.make_pathmapper = None # type: Callable[[List[Any], Text, Any], PathMapper]
136136
self.generatemapper = None # type: PathMapper
137137
self.collect_outputs = None # type: Union[Callable[[Any], Any], functools.partial[Any]]
138138
self.output_callback = None # type: Callable[[Any, Any], Any]

0 commit comments

Comments
 (0)