From e8c23136406fd4acd6c2b902e107dfea21a73762 Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Mon, 26 Jun 2017 01:12:22 +0100 Subject: [PATCH] Small fixes --- lib/galaxy/datatypes/data.py | 3 ++- lib/galaxy/tools/parameters/basic.py | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/galaxy/datatypes/data.py b/lib/galaxy/datatypes/data.py index 12ddb4ef3b9d..17d0e1a7d646 100644 --- a/lib/galaxy/datatypes/data.py +++ b/lib/galaxy/datatypes/data.py @@ -74,6 +74,7 @@ class Data( object ): """ edam_data = "data_0006" edam_format = "format_1915" + file_ext = 'data' # Data is not chunkable by default. CHUNKABLE = False @@ -682,7 +683,7 @@ def matches_any( self, target_datatypes ): Check if this datatype is of any of the target_datatypes or is a subtype thereof. """ - datatype_classes = tuple( [ datatype if isclass( datatype ) else datatype.__class__ for datatype in target_datatypes ] ) + datatype_classes = tuple( datatype if isclass( datatype ) else datatype.__class__ for datatype in target_datatypes ) return isinstance( self, datatype_classes ) def merge( split_files, output_file): diff --git a/lib/galaxy/tools/parameters/basic.py b/lib/galaxy/tools/parameters/basic.py index 8121280a0c9a..f8c6018f7524 100644 --- a/lib/galaxy/tools/parameters/basic.py +++ b/lib/galaxy/tools/parameters/basic.py @@ -75,7 +75,7 @@ def __init__( self, tool, input_source, context=None ): self.tool = tool self.refresh_on_change_values = [] self.argument = input_source.get( "argument" ) - self.name = ToolParameter.parse_name( input_source ) + self.name = self.__class__.parse_name( input_source ) self.type = input_source.get( "type" ) self.hidden = input_source.get( "hidden", False ) self.refresh_on_change = input_source.get_bool( "refresh_on_change", False ) @@ -227,8 +227,8 @@ def build( cls, tool, param ): else: return parameter_types[ param_type ]( tool, param ) - @classmethod - def parse_name( cls, input_source ): + @staticmethod + def parse_name( input_source ): name = input_source.get( 'name' ) if name is None: argument = input_source.get( 'argument' )