From e3e0a3fcbada056100c32d18e2d9022269883624 Mon Sep 17 00:00:00 2001 From: Samarendra Date: Tue, 8 Oct 2024 17:53:14 +0200 Subject: [PATCH] fixing ruff errors --- gaftools/gfa.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/gaftools/gfa.py b/gaftools/gfa.py index 323cf36..71d7ed8 100644 --- a/gaftools/gfa.py +++ b/gaftools/gfa.py @@ -634,19 +634,23 @@ def path_exists(self, ordered_path): # ordered_path = path.replace(">", ",").replace("<", ",").split(",") # if ordered_path[0] == "": # ordered_path = ordered_path[1:] - cases = {(">", ">"):("end", 0), - ("<", "<"):("start", 1), - (">", "<"):("end", 1), - ("<", ">"):("start", 0)} + cases = { + (">", ">"): ("end", 0), + ("<", "<"): ("start", 1), + (">", "<"): ("end", 1), + ("<", ">"): ("start", 0), + } for i in range(1, len(ordered_path)): - n1 = ordered_path[i-1] + n1 = ordered_path[i - 1] n2 = ordered_path[i] try: case = cases[(n1[0], n2[0])] except KeyError: - logging.error(f"Something went wrong when checking the path, make sure the path follows this example" - f">nodenodenodenode