From 828ba6728048ca374d97d7641947c3a9fdd0e292 Mon Sep 17 00:00:00 2001 From: Marcus Fedarko Date: Fri, 31 Mar 2023 13:51:40 -0700 Subject: [PATCH] MNT/DOC: adjust&doc a pyfastg should-never-happen --- metagenomescope/assembly_graph_parser.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/metagenomescope/assembly_graph_parser.py b/metagenomescope/assembly_graph_parser.py index 2befe438..d318e045 100644 --- a/metagenomescope/assembly_graph_parser.py +++ b/metagenomescope/assembly_graph_parser.py @@ -523,10 +523,11 @@ def parse_fastg(filename): elif suffix == "-": g.nodes[n]["orientation"] = "-" else: - raise GraphParsingError( - ( - "Node {} in parsed FASTG file doesn't have an orientation?" - ).format(n) + # shouldn't happen, unless pyfastg breaks or changes its behavior + # (but it's useful to have this check anyway, just to make this + # bulletproof in case i forget and break something later lol) + raise WeirdError( + f"Node {n} in parsed FASTG file doesn't have an orientation?" ) return g