Skip to content

Commit 3121c86

Browse files
committed
Cleaned up code a bit.
1 parent 86e9ed3 commit 3121c86

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

node_normalizer/normalizer.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -854,15 +854,16 @@ async def create_node(app, canonical_id, equivalent_ids, types_with_ancestors, i
854854
node["equivalent_identifiers"].append(eq_item)
855855

856856
if clique_leaders and canonical_id in clique_leaders and eqid["i"] in clique_leaders[canonical_id]:
857-
clique_leaders_output[eqid["i"]] = { "identifier": eqid["i"] }
857+
clique_leader_output = { "identifier": eqid["i"] }
858858
if "label" in eq_item:
859-
clique_leaders_output[eqid["i"]]["label"] = eq_item["label"]
859+
clique_leader_output["label"] = eq_item["label"]
860860
if "description" in eq_item:
861-
clique_leaders_output[eqid["i"]]["description"] = eq_item["description"]
861+
clique_leader_output["description"] = eq_item["description"]
862862
if "taxa" in eq_item:
863-
clique_leaders_output[eqid["i"]]["taxa"] = eq_item["taxa"]
863+
clique_leader_output["taxa"] = eq_item["taxa"]
864864
if "type" in eq_item:
865-
clique_leaders_output[eqid["i"]]["type"] = eq_item["type"]
865+
clique_leader_output["type"] = eq_item["type"]
866+
clique_leaders_output[eqid["i"]] = clique_leader_output
866867

867868
if include_descriptions and descriptions:
868869
node["descriptions"] = descriptions

0 commit comments

Comments
 (0)