diff --git a/lib/galaxy/containers/__init__.py b/lib/galaxy/containers/__init__.py index 24e17b9951f..1b3112d8610 100644 --- a/lib/galaxy/containers/__init__.py +++ b/lib/galaxy/containers/__init__.py @@ -47,7 +47,7 @@ class ContainerPort(namedtuple('ContainerPort', ('port', 'protocol', 'hostaddr', class ContainerVolume(with_metaclass(ABCMeta, object)): - valid_modes = frozenset(["ro", "rw"]) + valid_modes = frozenset({"ro", "rw"}) def __init__(self, path, host_path=None, mode=None): self.path = path diff --git a/lib/galaxy/datatypes/binary.py b/lib/galaxy/datatypes/binary.py index e88bd656a2a..36b655d30c3 100644 --- a/lib/galaxy/datatypes/binary.py +++ b/lib/galaxy/datatypes/binary.py @@ -1738,7 +1738,7 @@ class GAFASQLite(SQlite): def sniff(self, filename): if super(IdpDB, self).sniff(filename): - table_names = frozenset(['gene', 'gene_family', 'gene_family_member', 'meta', 'transcript']) + table_names = frozenset({'gene', 'gene_family', 'gene_family_member', 'meta', 'transcript'}) return self.sniff_table_names(filename, table_names) return False diff --git a/lib/galaxy/datatypes/dataproviders/dataset.py b/lib/galaxy/datatypes/dataproviders/dataset.py index 76666fa5ab0..7fec74ee4b5 100644 --- a/lib/galaxy/datatypes/dataproviders/dataset.py +++ b/lib/galaxy/datatypes/dataproviders/dataset.py @@ -652,7 +652,7 @@ class SamtoolsDataProvider(line.RegexLineDataProvider): # strip out any user supplied bash switch formating -> string of option chars # then compress to single option string of unique, VALID flags with prefixed bash switch char '-' options_string = options_string.strip('- ') - validated_flag_list = set([flag for flag in options_string if flag in self.FLAGS_WO_ARGS]) + validated_flag_list = {flag for flag in options_string if flag in self.FLAGS_WO_ARGS} # if sam add -S # TODO: not the best test in the world... diff --git a/lib/galaxy/job_metrics/collectl/processes.py b/lib/galaxy/job_metrics/collectl/processes.py index a3198eff217..c9d97f35be8 100644 --- a/lib/galaxy/job_metrics/collectl/processes.py +++ b/lib/galaxy/job_metrics/collectl/processes.py @@ -147,7 +147,7 @@ class CollectlProcessSummarizer(object): def __init__(self, pid, statistics): self.pid = pid self.statistics = statistics - self.columns_of_interest = set([s[1] for s in statistics]) + self.columns_of_interest = {s[1] for s in statistics} self.tree_statistics = collections.defaultdict(stats.StatisticsTracker) self.process_accum_statistics = collections.defaultdict(stats.StatisticsTracker) self.interval_count = 0 @@ -206,7 +206,7 @@ class CollectlProcessSummarizer(object): return process_rows def __all_child_pids(self, rows, pid): - pids_in_process_tree = set([str(self.pid)]) + pids_in_process_tree = {str(self.pid)} added = True while added: added = False diff --git a/lib/galaxy/jobs/handler.py b/lib/galaxy/jobs/handler.py index 695eb276574..dc395b9aced 100644 --- a/lib/galaxy/jobs/handler.py +++ b/lib/galaxy/jobs/handler.py @@ -96,10 +96,10 @@ class JobHandlerQueue(Monitors): self.__initialize_job_grabbing() def __initialize_job_grabbing(self): - grabbable_methods = set([ + grabbable_methods = { HANDLER_ASSIGNMENT_METHODS.DB_TRANSACTION_ISOLATION, HANDLER_ASSIGNMENT_METHODS.DB_SKIP_LOCKED, - ]) + } try: method = [m for m in self.app.job_config.handler_assignment_methods if m in grabbable_methods][0] except IndexError: diff --git a/lib/galaxy/jobs/runners/drmaa.py b/lib/galaxy/jobs/runners/drmaa.py index 22f7060bf31..e250ab4b580 100644 --- a/lib/galaxy/jobs/runners/drmaa.py +++ b/lib/galaxy/jobs/runners/drmaa.py @@ -29,7 +29,7 @@ log = logging.getLogger(__name__) __all__ = ('DRMAAJobRunner',) -RETRY_EXCEPTIONS_LOWER = frozenset(['invalidjobexception', 'internalexception']) +RETRY_EXCEPTIONS_LOWER = frozenset({'invalidjobexception', 'internalexception'}) class DRMAAJobRunner(AsynchronousJobRunner): diff --git a/lib/galaxy/managers/base.py b/lib/galaxy/managers/base.py index 84e29f06f40..5ada3f0cef9 100644 --- a/lib/galaxy/managers/base.py +++ b/lib/galaxy/managers/base.py @@ -551,7 +551,7 @@ class ModelSerializer(HasAModelManager): # this allows us to: 'mention' the key without adding the default serializer # TODO: we may want to eventually error if a key is requested # that is in neither serializable_keyset or serializers - self.serializable_keyset = set([]) + self.serializable_keyset = set() # a map of dictionary keys to the functions (often lambdas) that create the values for those keys self.serializers = {} # add subclass serializers defined there @@ -719,7 +719,7 @@ class ModelDeserializer(HasAModelManager): self.app = app self.deserializers = {} - self.deserializable_keyset = set([]) + self.deserializable_keyset = set() self.add_deserializers() # a sub object that can validate incoming values self.validate = validator or ModelValidator(self.app) diff --git a/lib/galaxy/managers/pages.py b/lib/galaxy/managers/pages.py index 8edf18ddbb4..f87bc36f1f1 100644 --- a/lib/galaxy/managers/pages.py +++ b/lib/galaxy/managers/pages.py @@ -228,11 +228,11 @@ class PageContentProcessor(HTMLParser, object): For now, processor renders embedded objects. """ bare_ampersand = re.compile(r"&(?!#\d+;|#x[0-9a-fA-F]+;|\w+;)") - elements_no_end_tag = set([ + elements_no_end_tag = { 'area', 'base', 'basefont', 'br', 'col', 'command', 'embed', 'frame', 'hr', 'img', 'input', 'isindex', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr' - ]) + } def __init__(self, trans, render_embed_html_fn): HTMLParser.__init__(self) diff --git a/lib/galaxy/managers/sharable.py b/lib/galaxy/managers/sharable.py index f6569ac374b..2073972c045 100644 --- a/lib/galaxy/managers/sharable.py +++ b/lib/galaxy/managers/sharable.py @@ -427,7 +427,7 @@ class SharableModelDeserializer(base.ModelDeserializer, unencoded_ids = [self.app.security.decode_id(id_) for id_ in val] new_users_shared_with = set(self.manager.user_manager.by_ids(unencoded_ids)) current_shares = self.manager.get_share_assocs(item) - currently_shared_with = set([share.user for share in current_shares]) + currently_shared_with = {share.user for share in current_shares} needs_adding = new_users_shared_with - currently_shared_with for user in needs_adding: diff --git a/lib/galaxy/managers/workflows.py b/lib/galaxy/managers/workflows.py index 5980cd8e0e2..0dc8075ed46 100644 --- a/lib/galaxy/managers/workflows.py +++ b/lib/galaxy/managers/workflows.py @@ -942,7 +942,7 @@ class WorkflowContentsManager(UsesAnnotations): # Encode input connections as dictionary input_conn_dict = {} - unique_input_names = set([conn.input_name for conn in input_connections]) + unique_input_names = {conn.input_name for conn in input_connections} for input_name in unique_input_names: input_conn_dicts = [] for conn in input_connections: @@ -1133,7 +1133,7 @@ class WorkflowContentsManager(UsesAnnotations): steps_by_external_id[external_id] = step if 'workflow_outputs' in step_dict: workflow_outputs = step_dict['workflow_outputs'] - found_output_names = set([]) + found_output_names = set() for workflow_output in workflow_outputs: # Allow workflow outputs as list of output_names for backward compatibility. if not isinstance(workflow_output, dict): diff --git a/lib/galaxy/model/__init__.py b/lib/galaxy/model/__init__.py index 76abfbe13a8..8fd41f1c35c 100644 --- a/lib/galaxy/model/__init__.py +++ b/lib/galaxy/model/__init__.py @@ -2170,7 +2170,7 @@ class Dataset(StorableObject, RepresentById): ) ready_states = tuple(set(states.__dict__.values()) - set(non_ready_states)) valid_input_states = tuple( - set(states.__dict__.values()) - set([states.ERROR, states.DISCARDED]) + set(states.__dict__.values()) - {states.ERROR, states.DISCARDED} ) terminal_states = ( states.OK, diff --git a/lib/galaxy/model/tags.py b/lib/galaxy/model/tags.py index a1590d7efb8..33c48750192 100644 --- a/lib/galaxy/model/tags.py +++ b/lib/galaxy/model/tags.py @@ -50,7 +50,7 @@ class TagHandler(object): def remove_tags_from_list(self, user, item, tag_to_remove_list): tag_to_remove_set = set(tag_to_remove_list) - tags_set = set([_.strip() for _ in self.get_tags_str(item.tags).split(',')]) + tags_set = {_.strip() for _ in self.get_tags_str(item.tags).split(',')} if item.tags: tags_set -= tag_to_remove_set return self.set_tags_from_list(user, item, tags_set) diff --git a/lib/galaxy/queue_worker.py b/lib/galaxy/queue_worker.py index 59335726060..78c7acc65b3 100644 --- a/lib/galaxy/queue_worker.py +++ b/lib/galaxy/queue_worker.py @@ -274,7 +274,7 @@ def reload_tour(app, **kwargs): def __job_rule_module_names(app): - rules_module_names = set(['galaxy.jobs.rules']) + rules_module_names = {'galaxy.jobs.rules'} if app.job_config.dynamic_params is not None: module_name = app.job_config.dynamic_params.get('rules_module') if module_name: diff --git a/lib/galaxy/tool_shed/galaxy_install/install_manager.py b/lib/galaxy/tool_shed/galaxy_install/install_manager.py index 3a2b2bedfc2..db53e270cec 100644 --- a/lib/galaxy/tool_shed/galaxy_install/install_manager.py +++ b/lib/galaxy/tool_shed/galaxy_install/install_manager.py @@ -925,7 +925,7 @@ class InstallRepositoryManager(object): self.update_tool_shed_repository_status(tool_shed_repository, self.install_model.ToolShedRepository.installation_status.INSTALLING_TOOL_DEPENDENCIES) new_tools = [self.app.toolbox._tools_by_id.get(tool_d['guid'], None) for tool_d in metadata['tools']] - new_requirements = set([tool.requirements.packages for tool in new_tools if tool]) + new_requirements = {tool.requirements.packages for tool in new_tools if tool} [self._view.install_dependencies(r) for r in new_requirements] dependency_manager = self.app.toolbox.dependency_manager if dependency_manager.cached: diff --git a/lib/galaxy/tool_util/cwl/representation.py b/lib/galaxy/tool_util/cwl/representation.py index a0627b54e16..94f2d4a24d5 100644 --- a/lib/galaxy/tool_util/cwl/representation.py +++ b/lib/galaxy/tool_util/cwl/representation.py @@ -109,7 +109,7 @@ def type_representation_from_name(type_representation_name): def type_descriptions_for_field_types(field_types): - type_representation_names = set([]) + type_representation_names = set() for field_type in field_types: if isinstance(field_type, dict) and field_type.get("type"): field_type = field_type.get("type") diff --git a/lib/galaxy/tool_util/deps/mulled/mulled_build.py b/lib/galaxy/tool_util/deps/mulled/mulled_build.py index d1251bd1dae..badf5a5d851 100644 --- a/lib/galaxy/tool_util/deps/mulled/mulled_build.py +++ b/lib/galaxy/tool_util/deps/mulled/mulled_build.py @@ -130,7 +130,7 @@ def get_affected_packages(args): hours = args.diff_hours cmd = ['git', 'log', '--diff-filter=ACMRTUXB', '--name-only', '--pretty=""', '--since="%s hours ago"' % hours] changed_files = subprocess.check_output(cmd, cwd=recipes_dir).strip().split('\n') - pkg_list = set([x for x in changed_files if x.startswith('recipes/') and x.endswith('meta.yaml')]) + pkg_list = {x for x in changed_files if x.startswith('recipes/') and x.endswith('meta.yaml')} for pkg in pkg_list: if pkg and os.path.exists(os.path.join(recipes_dir, pkg)): yield (get_pkg_name(args, pkg), get_tests(args, pkg)) diff --git a/lib/galaxy/tool_util/deps/resolvers/conda.py b/lib/galaxy/tool_util/deps/resolvers/conda.py index 83b17e85e62..8213dadb885 100644 --- a/lib/galaxy/tool_util/deps/resolvers/conda.py +++ b/lib/galaxy/tool_util/deps/resolvers/conda.py @@ -151,7 +151,7 @@ class CondaDependencyResolver(DependencyResolver, MultipleDependencyResolver, Li all_resolved = [r for r in all_resolved if r.dependency_type] if not all_resolved: return None - environments = set([os.path.basename(dependency.environment_path) for dependency in all_resolved]) + environments = {os.path.basename(dependency.environment_path) for dependency in all_resolved} return self.uninstall_environments(environments) def uninstall_environments(self, environments): diff --git a/lib/galaxy/tools/__init__.py b/lib/galaxy/tools/__init__.py index 58ab1f10d80..ff3a5e6b863 100755 --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -263,7 +263,7 @@ class ToolBox(BaseGalaxyToolBox): @property def all_requirements(self): - reqs = set([req for _, tool in self.tools() for req in tool.tool_requirements]) + reqs = {req for _, tool in self.tools() for req in tool.tool_requirements} return [r.to_dict() for r in reqs] @property diff --git a/lib/galaxy/tools/actions/upload_common.py b/lib/galaxy/tools/actions/upload_common.py index 35826c8ba42..3d9f6b67e17 100644 --- a/lib/galaxy/tools/actions/upload_common.py +++ b/lib/galaxy/tools/actions/upload_common.py @@ -82,7 +82,7 @@ def validate_url(url, ip_whitelist): # AF_* family: It will resolve to AF_INET or AF_INET6, getaddrinfo(3) doesn't even mention AF_UNIX, # socktype: We don't care if a stream/dgram/raw protocol # protocol: we don't care if it is tcp or udp. - addrinfo_results = set([info[4][0] for info in addrinfo]) + addrinfo_results = {info[4][0] for info in addrinfo} # There may be multiple (e.g. IPv4 + IPv6 or DNS round robin). Any one of these # could resolve to a local addresses (and could be returned by chance), # therefore we must check them all. diff --git a/lib/galaxy/util/__init__.py b/lib/galaxy/util/__init__.py index 5541006381f..046f4257730 100644 --- a/lib/galaxy/util/__init__.py +++ b/lib/galaxy/util/__init__.py @@ -921,8 +921,8 @@ def parse_resource_parameters(resource_param_file): # asbool implementation pulled from PasteDeploy -truthy = frozenset(['true', 'yes', 'on', 'y', 't', '1']) -falsy = frozenset(['false', 'no', 'off', 'n', 'f', '0']) +truthy = frozenset({'true', 'yes', 'on', 'y', 't', '1'}) +falsy = frozenset({'false', 'no', 'off', 'n', 'f', '0'}) def asbool(obj): diff --git a/lib/galaxy/visualization/plugins/interactive_environments.py b/lib/galaxy/visualization/plugins/interactive_environments.py index 1ebce51c994..aafa1778c89 100644 --- a/lib/galaxy/visualization/plugins/interactive_environments.py +++ b/lib/galaxy/visualization/plugins/interactive_environments.py @@ -28,13 +28,13 @@ from galaxy.util.bunch import Bunch IS_OS_X = _platform == "darwin" CONTAINER_NAME_PREFIX = 'gie_' -ENV_OVERRIDE_CAPITALIZE = frozenset([ +ENV_OVERRIDE_CAPITALIZE = frozenset({ 'notebook_username', 'notebook_password', 'dataset_hid', 'dataset_filename', 'additional_ids', -]) +}) log = logging.getLogger(__name__) diff --git a/lib/galaxy/web_stack/__init__.py b/lib/galaxy/web_stack/__init__.py index 6ea6c4a0aa5..4635a491d40 100644 --- a/lib/galaxy/web_stack/__init__.py +++ b/lib/galaxy/web_stack/__init__.py @@ -228,10 +228,10 @@ class UWSGIApplicationStack(MessageApplicationStack): Note that mules will use this as their stack class even though they start with the "webless" loading point. """ name = 'uWSGI' - prohibited_middleware = frozenset([ + prohibited_middleware = frozenset({ 'wrap_in_static', 'EvalException', - ]) + }) transport_class = UWSGIFarmMessageTransport log_filter_class = UWSGILogFilter log_format = '%(name)s %(levelname)s %(asctime)s [p:%(process)s,w:%(worker_id)s,m:%(mule_id)s] [%(threadName)s] %(message)s' diff --git a/lib/galaxy/webapps/galaxy/api/datatypes.py b/lib/galaxy/webapps/galaxy/api/datatypes.py index d4891d5e4f8..c0d3f4292c0 100644 --- a/lib/galaxy/webapps/galaxy/api/datatypes.py +++ b/lib/galaxy/webapps/galaxy/api/datatypes.py @@ -68,7 +68,7 @@ class DatatypesController(BaseAPIController): visit_bases(types, base) for c in classes: n = c.__module__ + "." + c.__name__ - types = set([n]) + types = {n} visit_bases(types, c) class_to_classes[n] = dict((t, True) for t in types) return dict(ext_to_class_name=ext_to_class_name, class_to_classes=class_to_classes) diff --git a/lib/galaxy/webapps/galaxy/api/histories.py b/lib/galaxy/webapps/galaxy/api/histories.py index 7765ced04a9..633775ab90a 100644 --- a/lib/galaxy/webapps/galaxy/api/histories.py +++ b/lib/galaxy/webapps/galaxy/api/histories.py @@ -234,7 +234,7 @@ class HistoriesController(BaseAPIController, ExportsHistoryMixin, ImportsHistory the history. """ history = self.manager.get_accessible(self.decode_id(history_id), trans.user, current_history=trans.history) - tool_ids = set([]) + tool_ids = set() for dataset in history.datasets: job = dataset.creating_job if not job: diff --git a/lib/galaxy/webapps/galaxy/api/tool_dependencies.py b/lib/galaxy/webapps/galaxy/api/tool_dependencies.py index 9f0689276a7..33d7d4b4125 100644 --- a/lib/galaxy/webapps/galaxy/api/tool_dependencies.py +++ b/lib/galaxy/webapps/galaxy/api/tool_dependencies.py @@ -246,7 +246,7 @@ class ToolDependenciesAPIController(BaseAPIController): """ tools_by_id = trans.app.toolbox.tools_by_id.copy() tool_ids = payload.get("tool_ids") - requirements = set([tools_by_id[tid].tool_requirements for tid in tool_ids]) + requirements = {tools_by_id[tid].tool_requirements for tid in tool_ids} install_kwds = {} for source in [payload, kwds]: if 'include_containers' in source: @@ -280,7 +280,7 @@ class ToolDependenciesAPIController(BaseAPIController): """ tools_by_id = trans.app.toolbox.tools_by_id.copy() tool_ids = payload.get("tool_ids") - requirements = set([tools_by_id[tid].tool_requirements for tid in tool_ids]) + requirements = {tools_by_id[tid].tool_requirements for tid in tool_ids} install_kwds = {} for source in [payload, kwds]: if 'include_containers' in source: diff --git a/lib/galaxy/webapps/galaxy/api/workflows.py b/lib/galaxy/webapps/galaxy/api/workflows.py index dcfd9f81125..15ed31f2f86 100644 --- a/lib/galaxy/webapps/galaxy/api/workflows.py +++ b/lib/galaxy/webapps/galaxy/api/workflows.py @@ -302,7 +302,7 @@ class WorkflowsAPIController(BaseAPIController, UsesStoredWorkflowMixin, UsesAnn :param use_cached_job: If set to True galaxy will attempt to find previously executed steps for all workflow steps with the exact same parameter combinations and will copy the outputs of the previously executed step. """ - ways_to_create = set([ + ways_to_create = { 'archive_source', 'workflow_id', 'installed_repository_file', @@ -310,7 +310,7 @@ class WorkflowsAPIController(BaseAPIController, UsesStoredWorkflowMixin, UsesAnn 'from_path', 'shared_workflow_id', 'workflow', - ]) + } if len(ways_to_create.intersection(payload)) == 0: message = "One parameter among - %s - must be specified" % ", ".join(ways_to_create) diff --git a/lib/galaxy/webapps/galaxy/controllers/admin.py b/lib/galaxy/webapps/galaxy/controllers/admin.py index 0ff609e5b23..ddf231c5d6b 100644 --- a/lib/galaxy/webapps/galaxy/controllers/admin.py +++ b/lib/galaxy/webapps/galaxy/controllers/admin.py @@ -1602,7 +1602,7 @@ class AdminGalaxy(controller.JSAppLauncher, AdminActions, UsesQuotaMixin, QuotaP # install the dependencies for the tools in the selected_tool_ids list if not isinstance(selected_tool_ids, list): selected_tool_ids = [selected_tool_ids] - requirements = set([tools_by_id[tid].tool_requirements for tid in selected_tool_ids]) + requirements = {tools_by_id[tid].tool_requirements for tid in selected_tool_ids} if install_dependencies: [view.install_dependencies(r) for r in requirements] elif uninstall_dependencies: diff --git a/lib/galaxy/webapps/galaxy/controllers/dataset.py b/lib/galaxy/webapps/galaxy/controllers/dataset.py index 62e9f7494d3..6a29f9984a3 100644 --- a/lib/galaxy/webapps/galaxy/controllers/dataset.py +++ b/lib/galaxy/webapps/galaxy/controllers/dataset.py @@ -1003,7 +1003,7 @@ class DatasetInterface(BaseUIController, UsesAnnotations, UsesItemRatings, UsesE elif target_history_ids: if not isinstance(target_history_ids, list): target_history_ids = target_history_ids.split(",") - target_history_ids = list(set([self.decode_id(h) for h in target_history_ids if h])) + target_history_ids = list({self.decode_id(h) for h in target_history_ids if h}) else: target_history_ids = [] done_msg = error_msg = "" diff --git a/test/unit/jobs/test_rule_helper.py b/test/unit/jobs/test_rule_helper.py index 386cb50aa8b..f414653d474 100644 --- a/test/unit/jobs/test_rule_helper.py +++ b/test/unit/jobs/test_rule_helper.py @@ -77,22 +77,22 @@ def test_choose_one_unhashed(): rule_helper = __rule_helper() # Random choices if hash not set. - chosen_ones = set([]) + chosen_ones = set() __do_a_bunch(lambda: chosen_ones.add(rule_helper.choose_one(['a', 'b']))) - assert chosen_ones == set(['a', 'b']) + assert chosen_ones == {'a', 'b'} def test_choose_one_hashed(): rule_helper = __rule_helper() # Hashed, so all choosen ones should be the same... - chosen_ones = set([]) + chosen_ones = set() __do_a_bunch(lambda: chosen_ones.add(rule_helper.choose_one(['a', 'b'], hash_value=1234))) assert len(chosen_ones) == 1 # ... also can verify hashing on strings - chosen_ones = set([]) + chosen_ones = set() __do_a_bunch(lambda: chosen_ones.add(rule_helper.choose_one(['a', 'b'], hash_value="i am a string"))) assert len(chosen_ones) == 1 diff --git a/test/unit/test_containers.py b/test/unit/test_containers.py index 02e30a462e0..965d30fae00 100644 --- a/test/unit/test_containers.py +++ b/test/unit/test_containers.py @@ -5,4 +5,4 @@ def test_dummy(): t = galaxy.containers.parse_containers_config('') assert t == {'_default_': {'type': 'docker'}} s = galaxy.containers.docker_model.DockerAttributeContainer() - assert s.members == frozenset([]) + assert s.members == frozenset() diff --git a/test/unit/tool_util/test_tool_deps.py b/test/unit/tool_util/test_tool_deps.py index 1f15d880a0c..3c595f31fbe 100644 --- a/test/unit/tool_util/test_tool_deps.py +++ b/test/unit/tool_util/test_tool_deps.py @@ -140,7 +140,7 @@ def test_tool_requirements(): assert tool_requirements_ab == ToolRequirements([REQUIREMENT_B, REQUIREMENT_A]) assert tool_requirements_ab == ToolRequirements([REQUIREMENT_B, REQUIREMENT_A, REQUIREMENT_A]) assert tool_requirements_ab != tool_requirements_b - assert len(set([tool_requirements_ab, tool_requirements_ab_dup])) == 1 + assert len({tool_requirements_ab, tool_requirements_ab_dup}) == 1 def test_module_dependency_resolver(): diff --git a/tools/phenotype_association/pagetag.py b/tools/phenotype_association/pagetag.py index fd521798698..aaa004d5674 100755 --- a/tools/phenotype_association/pagetag.py +++ b/tools/phenotype_association/pagetag.py @@ -94,7 +94,7 @@ def annotate_locus(input, minorallelefrequency, snpsfile): genotypes = v.values() alleles = [y for x in genotypes for y in x] alleleset = list(set(alleles)) - alleleset = list(set(alleles) - set(["N", "X"])) + alleleset = list(set(alleles) - {'N', 'X'}) if len(alleleset) == 2: genotypevec = ""