@@ -298,6 +298,8 @@ def fast_validator(
298
298
299
299
_fast_validator_convert_stdstreams_to_files (objects )
300
300
301
+ processobj : Union [MutableMapping [str , Any ], MutableSequence [Any ], float , str , None ]
302
+
301
303
processobj = cwl_v1_2 .save (objects , relative_uris = False )
302
304
303
305
metadata : Dict [str , Any ] = {}
@@ -318,9 +320,10 @@ def fast_validator(
318
320
if loadingContext .loader :
319
321
loadingContext .loader .graph += loadopt .graph
320
322
321
- return cast (Union [CommentedMap , CommentedSeq ], cmap (processobj )), cast (
322
- CommentedMap , cmap (metadata )
323
- )
323
+ return cast (
324
+ Union [CommentedMap , CommentedSeq ],
325
+ cmap (cast (Union [Dict [str , Any ], List [Any ]], processobj )),
326
+ ), cast (CommentedMap , cmap (metadata ))
324
327
325
328
326
329
def resolve_and_validate_document (
@@ -354,6 +357,8 @@ def resolve_and_validate_document(
354
357
355
358
fileuri = urllib .parse .urldefrag (uri )[0 ]
356
359
360
+ metadata : CWLObjectType
361
+
357
362
cwlVersion = loadingContext .metadata .get ("cwlVersion" )
358
363
if not cwlVersion :
359
364
cwlVersion = workflowobj .get ("cwlVersion" )
@@ -426,7 +431,7 @@ def resolve_and_validate_document(
426
431
if isinstance (avsc_names , Exception ):
427
432
raise avsc_names
428
433
429
- processobj = None # type: Optional[ResolveType ]
434
+ processobj : Union [ CommentedMap , CommentedSeq , int , float , str , None ]
430
435
document_loader = Loader (
431
436
sch_document_loader .ctx ,
432
437
schemagraph = sch_document_loader .graph ,
@@ -515,6 +520,9 @@ def make_tool(
515
520
if loadingContext .loader is None :
516
521
raise ValueError ("loadingContext must have a loader" )
517
522
523
+ resolveduri : Union [float , str , CommentedMap , CommentedSeq , None ]
524
+ metadata : CWLObjectType
525
+
518
526
if loadingContext .fast_validator and isinstance (uri , str ):
519
527
resolveduri , metadata = fast_validator (None , None , uri , loadingContext )
520
528
else :
0 commit comments