18
18
import six
19
19
from six import string_types
20
20
from six .moves import range
21
- from uuid import UUID # pylint: disable=unused-import
21
+ from uuid import UUID # pylint: disable=unused-import
22
22
23
23
from . import command_line_tool , expression
24
24
from .builder import CONTENT_LIMIT
@@ -209,7 +209,7 @@ def __init__(self, workflow, runtimeContext):
209
209
# type: (Workflow, RuntimeContext) -> None
210
210
self .workflow = workflow
211
211
self .prov_obj = None # type: Optional[CreateProvProfile]
212
- self .parent_wf = None # type: Optional[CreateProvProfile]
212
+ self .parent_wf = None # type: Optional[CreateProvProfile]
213
213
self .tool = workflow .tool
214
214
if runtimeContext .research_obj :
215
215
self .prov_obj = workflow .provenance_object
@@ -502,8 +502,8 @@ def __init__(self,
502
502
toolpath_object , loadingContext )
503
503
self .provenance_object = None # type: Optional[CreateProvProfile]
504
504
if loadingContext .research_obj :
505
- run_uuid = None # type: Optional[UUID]
506
- is_master = not (loadingContext .prov_obj ) # Not yet set
505
+ run_uuid = None # type: Optional[UUID]
506
+ is_master = not (loadingContext .prov_obj ) # Not yet set
507
507
if is_master :
508
508
run_uuid = loadingContext .research_obj .ro_uuid
509
509
@@ -513,8 +513,7 @@ def __init__(self,
513
513
orcid = loadingContext .orcid ,
514
514
host_provenance = loadingContext .host_provenance ,
515
515
user_provenance = loadingContext .user_provenance ,
516
- run_uuid = run_uuid # inherit RO UUID for master wf run
517
- )
516
+ run_uuid = run_uuid ) # inherit RO UUID for master wf run
518
517
# TODO: Is Workflow(..) only called when we are the master workflow?
519
518
self .parent_wf = self .provenance_object
520
519
@@ -603,6 +602,7 @@ def __init__(self,
603
602
loadingContext = loadingContext .copy ()
604
603
605
604
loadingContext .requirements = copy .deepcopy (getdefault (loadingContext .requirements , []))
605
+ assert loadingContext .requirements is not None
606
606
loadingContext .requirements .extend (toolpath_object .get ("requirements" , []))
607
607
loadingContext .requirements .extend (get_overrides (getdefault (loadingContext .overrides_list , []),
608
608
self .id ).get ("requirements" , []))
@@ -613,7 +613,7 @@ def __init__(self,
613
613
try :
614
614
if isinstance (toolpath_object ["run" ], MutableMapping ):
615
615
self .embedded_tool = loadingContext .construct_tool_object (
616
- toolpath_object ["run" ], loadingContext )
616
+ toolpath_object ["run" ], loadingContext ) # type: Process
617
617
else :
618
618
self .embedded_tool = load_tool (
619
619
toolpath_object ["run" ], loadingContext )
@@ -891,7 +891,7 @@ def nested_crossproduct_scatter(process, # type: WorkflowJobStep
891
891
scatter_keys , # type: MutableSequence[Text]
892
892
output_callback , # type: Callable[..., Any]
893
893
runtimeContext # type: RuntimeContext
894
- ): #type: (...) -> Generator
894
+ ): # type: (...) -> Generator
895
895
scatter_key = scatter_keys [0 ]
896
896
jobl = len (joborder [scatter_key ])
897
897
output = {} # type: Dict[Text, List[Optional[Text]]]
0 commit comments