From 32436b85ee13d233cf2cf1153af4d092365ad45a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A9r=C3=A9nice=20Batut?= Date: Thu, 1 Aug 2024 17:44:53 +0200 Subject: [PATCH] Try to fix CI linting --- bin/extract_galaxy_workflows.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/extract_galaxy_workflows.py b/bin/extract_galaxy_workflows.py index eec03b4c..335dbef1 100644 --- a/bin/extract_galaxy_workflows.py +++ b/bin/extract_galaxy_workflows.py @@ -55,7 +55,7 @@ def init_from_search(self, wf: dict, source: str, tools: dict) -> None: self.source = source if self.source == "WorkflowHub": self.id = wf["data"]["id"] - self.link = f"https://workflowhub.eu{wf["data"]["links"]["self"]}" + self.link = f"https://workflowhub.eu{ wf['data']['links']['self'] }" self.name = wf["data"]["attributes"]["title"] self.tags = wf["data"]["attributes"]["tags"] self.create_time = shared.format_date(wf["data"]["attributes"]["created_at"]) @@ -68,7 +68,7 @@ def init_from_search(self, wf: dict, source: str, tools: dict) -> None: self.edam_topic = [t["label"] for t in wf["data"]["attributes"]["topic_annotations"]] else: self.id = wf["id"] - self.link = f"{ source }/published/workflow?id={ wf["id"] }" + self.link = f"{ source }/published/workflow?id={ wf['id'] }" self.name = wf["name"] self.add_creators(wf) self.number_of_steps = wf["number_of_steps"] if "number_of_steps" in wf else len(wf["steps"].keys()) @@ -95,7 +95,7 @@ def add_creators(self, wf: dict) -> None: if other and len(other) > 0: self.creators.extend(wf["data"]["attributes"]["other_creators"].split(",")) else: - self.creators.extend([f"{c["given_name"]} {c["family_name"]}" for c in creators]) + self.creators.extend([f"{c['given_name']} {c['family_name']}" for c in creators]) else: if "creator" in wf and wf["creator"] is not None: self.creators.extend([c["name"] for c in wf["creator"]]) @@ -146,13 +146,13 @@ def add_workflows_from_workflowhub(self) -> None: "https://workflowhub.eu/workflows?filter[workflow_type]=galaxy", header, ) - print(f"Workflows from WorkflowHub: {len(wfhub_wfs["data"])}") + print(f"Workflows from WorkflowHub: {len(wfhub_wfs['data'])}") data = wfhub_wfs["data"] if self.test: data = data[:1] for wf in data: wfhub_wf = shared.get_request_json( - f"https://workflowhub.eu{wf["links"]["self"]}", + f"https://workflowhub.eu{wf['links']['self']}", header, ) wf = Workflow() @@ -173,7 +173,7 @@ def add_workflows_from_a_server(self, server: str) -> None: if wf["published"] and wf["importable"] and not wf["deleted"] and not wf["hidden"]: count += 1 server_wf = shared.get_request_json( - f"{server}/api/workflows/{wf["id"]}", + f"{server}/api/workflows/{wf['id']}", header, ) wf = Workflow()