|
16 | 16 | from enum import Enum
|
17 | 17 | from functools import cmp_to_key, partial
|
18 | 18 | from re import Pattern
|
19 |
| -from typing import TYPE_CHECKING, Any, Optional, TextIO, Union, cast |
| 19 | +from typing import TYPE_CHECKING, Any, Iterable, Optional, TextIO, Union, cast |
20 | 20 |
|
21 | 21 | from mypy_extensions import mypyc_attr
|
22 | 22 | from ruamel.yaml.comments import CommentedMap, CommentedSeq
|
@@ -1322,26 +1322,29 @@ def collect_output(
|
1322 | 1322 | key=cmp_to_key(locale.strcoll),
|
1323 | 1323 | )
|
1324 | 1324 | r.extend(
|
1325 |
| - [ |
1326 |
| - { |
1327 |
| - "location": g, |
1328 |
| - "path": fs_access.join( |
1329 |
| - builder.outdir, |
1330 |
| - urllib.parse.unquote(g[len(prefix[0]) + 1 :]), |
1331 |
| - ), |
1332 |
| - "basename": decoded_basename, |
1333 |
| - "nameroot": os.path.splitext(decoded_basename)[0], |
1334 |
| - "nameext": os.path.splitext(decoded_basename)[1], |
1335 |
| - "class": "File" if fs_access.isfile(g) else "Directory", |
1336 |
| - } |
1337 |
| - for g, decoded_basename in zip( |
1338 |
| - sorted_glob_result, |
1339 |
| - map( |
1340 |
| - lambda x: os.path.basename(urllib.parse.unquote(x)), |
| 1325 | + cast( |
| 1326 | + Iterable[CWLOutputType], |
| 1327 | + [ |
| 1328 | + { |
| 1329 | + "location": g, |
| 1330 | + "path": fs_access.join( |
| 1331 | + builder.outdir, |
| 1332 | + urllib.parse.unquote(g[len(prefix[0]) + 1 :]), |
| 1333 | + ), |
| 1334 | + "basename": decoded_basename, |
| 1335 | + "nameroot": os.path.splitext(decoded_basename)[0], |
| 1336 | + "nameext": os.path.splitext(decoded_basename)[1], |
| 1337 | + "class": "File" if fs_access.isfile(g) else "Directory", |
| 1338 | + } |
| 1339 | + for g, decoded_basename in zip( |
1341 | 1340 | sorted_glob_result,
|
1342 |
| - ), |
1343 |
| - ) |
1344 |
| - ] |
| 1341 | + map( |
| 1342 | + lambda x: os.path.basename(urllib.parse.unquote(x)), |
| 1343 | + sorted_glob_result, |
| 1344 | + ), |
| 1345 | + ) |
| 1346 | + ], |
| 1347 | + ) |
1345 | 1348 | )
|
1346 | 1349 | except OSError as e:
|
1347 | 1350 | _logger.warning(str(e), exc_info=builder.debug)
|
|
0 commit comments