From 9339fb3a2f10847ac87672879fa5b48215dea224 Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Mon, 11 Dec 2023 20:59:34 +0000 Subject: [PATCH] Fix B018 errors reported by flake8-bugbear 23.12.2 --- lib/galaxy/config_watchers.py | 4 ++-- scripts/microbes/harvest_bacteria.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/galaxy/config_watchers.py b/lib/galaxy/config_watchers.py index 0482aa9ac40b..867e2f926599 100644 --- a/lib/galaxy/config_watchers.py +++ b/lib/galaxy/config_watchers.py @@ -31,13 +31,13 @@ def reload_toolbox(): try: # Run and wait for toolbox reload on the process that watches the config files. # The toolbox reload will update the integrated_tool_panel_file - self.app.queue_worker.send_local_control_task("reload_toolbox", get_response=True), + self.app.queue_worker.send_local_control_task("reload_toolbox", get_response=True) except Exception: save_integrated_tool_panel = True log.exception("Exception occured while reloading toolbox") self.app.queue_worker.send_control_task( "reload_toolbox", noop_self=True, kwargs={"save_integrated_tool_panel": save_integrated_tool_panel} - ), + ) self.tool_config_watcher = get_tool_conf_watcher( reload_callback=reload_toolbox, diff --git a/scripts/microbes/harvest_bacteria.py b/scripts/microbes/harvest_bacteria.py index ba3f07507e63..a94ae088dbae 100644 --- a/scripts/microbes/harvest_bacteria.py +++ b/scripts/microbes/harvest_bacteria.py @@ -79,9 +79,9 @@ def get_chroms_by_project_id( ): html_count = 0 html = None + url = f"{base_url}{org_num}" while html_count < 500 and html is None: html_count += 1 - url = f"{base_url}{org_num}" try: html = requests.get(url).text except Exception: @@ -89,7 +89,7 @@ def get_chroms_by_project_id( html = None time.sleep(1) # Throttle Connection if html is None: - "GENOME PROJECT COMPLETELY FAILED TO LOAD", "org:", org_num, "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=genomeprj&cmd=Retrieve&dopt=Overview&list_uids=" + org_num + print("GENOME PROJECT COMPLETELY FAILED TO LOAD", "org:", org_num, url) return None chroms = []