From 64f584b6b5974ae41c75c26c8d1c0f517a33014f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A9r=C3=A9nice=20Batut?= Date: Tue, 31 Oct 2023 13:08:38 +0100 Subject: [PATCH] Fix linting --- bin/extract_galaxy_tools.py | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/bin/extract_galaxy_tools.py b/bin/extract_galaxy_tools.py index e28449ac..49615479 100644 --- a/bin/extract_galaxy_tools.py +++ b/bin/extract_galaxy_tools.py @@ -135,7 +135,7 @@ def check_categories(ts_categories, ts_cat): :param ts_cat: list of ToolShed categories to keep in the extraction """ if ts_categories is not None and len(ts_cat) > 0: - ts_cats = ts_categories.split(', ') + ts_cats = ts_categories.split(", ") to_keep = False for cat in ts_cats: if cat in ts_cat: @@ -145,7 +145,7 @@ def check_categories(ts_categories, ts_cat): def get_tool_metadata(tool, repo): - """" + """" " Get tool information - Check the `.shed.yaml` file - Extract metadata from the `.shed.yaml` @@ -174,7 +174,7 @@ def get_tool_metadata(tool, repo): "Galaxy wrapper source": None, "Galaxy wrapper version": None, "Conda id": None, - "Conda version": None + "Conda version": None, } # extract .shed.yml information and check macros.xml try: @@ -368,7 +368,9 @@ def filter_tools(tools, ts_cat, excluded_tools, keep_tools): if __name__ == "__main__": - parser = argparse.ArgumentParser(description="Extract Galaxy tools from GitHub repositories together with biotools and conda metadata") + parser = argparse.ArgumentParser( + description="Extract Galaxy tools from GitHub repositories together with biotools and conda metadata" + ) subparser = parser.add_subparsers(dest="command") # Extract tools extractools = subparser.add_parser("extractools", help="Extract tools") @@ -376,10 +378,19 @@ def filter_tools(tools, ts_cat, excluded_tools, keep_tools): extractools.add_argument("--all_tools", "-o", required=True, help="Filepath to CSV with all extracted tools") # Filter tools filtertools = subparser.add_parser("filtertools", help="Filter tools") - filtertools.add_argument("--tools", "-t", required=True, help="Filepath to CSV with all extracted tools, generated by extractools command") + filtertools.add_argument( + "--tools", + "-t", + required=True, + help="Filepath to CSV with all extracted tools, generated by extractools command" + ) filtertools.add_argument("--filtered_tools", "-f", required=True, help="Filepath to CSV with filtered tools") - filtertools.add_argument("--categories", "-c", help="Path to a file with ToolShed category to keep in the extraction (one per line)") - filtertools.add_argument("--exclude", "-e", help="Path to a file with ToolShed ids of tools to exclude (one per line)") + filtertools.add_argument( + "--categories", "-c", help="Path to a file with ToolShed category to keep in the extraction (one per line)" + ) + filtertools.add_argument( + "--exclude", "-e", help="Path to a file with ToolShed ids of tools to exclude (one per line)" + ) filtertools.add_argument("--keep", "-k", help="Path to a file with ToolShed ids of tools to keep (one per line)") args = parser.parse_args()