mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-25 00:12:08 +08:00
Refactor to clean up args in one method of galaxy.tools.
This commit is contained in:
@@ -228,7 +228,7 @@ class ToolBox( BaseGalaxyToolBox ):
|
||||
# Deprecated method, TODO - eliminate calls to this in test/.
|
||||
return self._tools_by_id
|
||||
|
||||
def create_tool( self, config_file, repository_id=None, guid=None, **kwds ):
|
||||
def create_tool( self, config_file, **kwds ):
|
||||
try:
|
||||
tool_source = get_tool_source(
|
||||
config_file,
|
||||
@@ -239,6 +239,9 @@ class ToolBox( BaseGalaxyToolBox ):
|
||||
# capture and log parsing errors
|
||||
global_tool_errors.add_error(config_file, "Tool XML parsing", e)
|
||||
raise e
|
||||
return self._create_tool_from_source( tool_source, config_file=config_file, **kwds )
|
||||
|
||||
def _create_tool_from_source( self, tool_source, config_file=None, **kwds ):
|
||||
# Allow specifying a different tool subclass to instantiate
|
||||
tool_module = tool_source.parse_tool_module()
|
||||
if tool_module is not None:
|
||||
@@ -252,7 +255,7 @@ class ToolBox( BaseGalaxyToolBox ):
|
||||
# Normal tool
|
||||
root = getattr( tool_source, 'root', None )
|
||||
ToolClass = Tool
|
||||
tool = ToolClass( config_file, tool_source, self.app, guid=guid, repository_id=repository_id, **kwds )
|
||||
tool = ToolClass( config_file, tool_source, self.app, **kwds )
|
||||
return tool
|
||||
|
||||
def get_tool_components( self, tool_id, tool_version=None, get_loaded_tools_by_lineage=False, set_selected=False ):
|
||||
|
||||
Reference in New Issue
Block a user