@@ -339,7 +339,8 @@ def process_dataset(data, formats=None):
339339 )
340340 collection_builder = CollectionBuilder (collection_type_description )
341341 collection_builder .replace_elements_in_collection (
342- template_collection = collection , replacement_dict = processed_dataset_dict
342+ template_collection = collection ,
343+ replacement_dict = processed_dataset_dict ,
343344 )
344345 new_collection = collection_builder .build ()
345346 if child_collection :
@@ -435,7 +436,7 @@ def _collect_inputs(self, tool, trans, incoming, history, current_user_roles, co
435436 for tag in collection .auto_propagated_tags :
436437 preserved_hdca_tags [tag .value ] = tag
437438 preserved_tags .update (preserved_hdca_tags )
438- return ( history , inp_data , inp_dataset_collections , preserved_tags , preserved_hdca_tags , all_permissions )
439+ return history , inp_data , inp_dataset_collections , preserved_tags , preserved_hdca_tags , all_permissions
439440
440441 def execute (
441442 self ,
@@ -468,9 +469,14 @@ def execute(
468469 if execution_cache is None :
469470 execution_cache = ToolExecutionCache (trans )
470471 current_user_roles = execution_cache .current_user_roles
471- history , inp_data , inp_dataset_collections , preserved_tags , preserved_hdca_tags , all_permissions = (
472- self ._collect_inputs (tool , trans , incoming , history , current_user_roles , collection_info )
473- )
472+ (
473+ history ,
474+ inp_data ,
475+ inp_dataset_collections ,
476+ preserved_tags ,
477+ preserved_hdca_tags ,
478+ all_permissions ,
479+ ) = self ._collect_inputs (tool , trans , incoming , history , current_user_roles , collection_info )
474480 assert history # tell type system we've set history and it is no longer optional
475481 # Build name for output datasets based on tool name and input names
476482 on_text = self ._get_on_text (inp_data , inp_dataset_collections )
@@ -674,7 +680,12 @@ def handle_output(name, output, hidden=None):
674680 else :
675681 index = name_to_index [parent_id ]
676682 current_element_identifiers = cast (
677- list [dict [str , Union [str , list [dict [str , Union [str , list [Any ]]]]]]],
683+ list [
684+ dict [
685+ str ,
686+ Union [str , list [dict [str , Union [str , list [Any ]]]]],
687+ ]
688+ ],
678689 current_element_identifiers [index ]["element_identifiers" ],
679690 )
680691
@@ -688,14 +699,20 @@ def handle_output(name, output, hidden=None):
688699 # Following hack causes dataset to no be added to history...
689700 trans .sa_session .add (element )
690701 current_element_identifiers .append (
691- {"__object__" : element , "name" : output_part_def .element_identifier }
702+ {
703+ "__object__" : element ,
704+ "name" : output_part_def .element_identifier ,
705+ }
692706 )
693707
694708 if output .dynamic_structure :
695709 assert not element_identifiers # known_outputs must have been empty
696710 element_kwds = dict (elements = collections_manager .ELEMENTS_UNINITIALIZED )
697711 else :
698- element_kwds = dict (element_identifiers = element_identifiers , fields = output .structure .fields )
712+ element_kwds = dict (
713+ element_identifiers = element_identifiers ,
714+ fields = output .structure .fields ,
715+ )
699716 output_collections .create_collection (
700717 output = output , name = name , completed_job = completed_job , ** element_kwds
701718 )
@@ -705,7 +722,8 @@ def handle_output(name, output, hidden=None):
705722 log .info (f"Handled output named { name } for tool { tool .id } { handle_output_timer } " )
706723
707724 add_datasets_timer = tool .app .execution_timer_factory .get_timer (
708- "internals.galaxy.tools.actions.add_datasets" , "Added output datasets to history"
725+ "internals.galaxy.tools.actions.add_datasets" ,
726+ "Added output datasets to history" ,
709727 )
710728 # Add all the top-level (non-child) datasets to the history unless otherwise specified
711729 for name , data in out_data .items ():
0 commit comments