From e77978ce387f21175e6a134c9258a2cf11debf8c Mon Sep 17 00:00:00 2001 From: Sylvain Soliman <Sylvain.Soliman@inria.fr> Date: Sun, 12 Feb 2023 17:04:42 +0100 Subject: [PATCH] FIX TODOs --- casq/readCD.py | 1 - casq/simplify.py | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/casq/readCD.py b/casq/readCD.py index 14695e9..22eb301 100644 --- a/casq/readCD.py +++ b/casq/readCD.py @@ -39,7 +39,6 @@ NS = { "xhtml": "http://www.w3.org/1999/xhtml", } -# TODO use attrs, see https://www.attrs.org/en/latest/why.html#namedtuples Transition = collections.namedtuple( "Transition", ["type", "reactants", "modifiers", "notes", "annotations"] ) diff --git a/casq/simplify.py b/casq/simplify.py index c405189..ea30c7b 100644 --- a/casq/simplify.py +++ b/casq/simplify.py @@ -285,10 +285,9 @@ def fix_all_names(info): if ambiguous_name[species]: if name in namedict: other_id, other_activity = namedict[name] - if activity == "active": - # FIXME what if name_active in namedict? + if activity == "active" and (name + "_active") not in namedict: name = name + "_active" - elif other_activity == "active": + elif other_activity == "active" and (name + "_active") not in namedict: info[other_id]["name"] = name + "_active" info[other_id]["function"] = name + "_active" else: -- GitLab