Skip to content

Commit d7c45fb

Browse files
committed
reformat ruff
1 parent 39e22ec commit d7c45fb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

chebi_utils/obo_extractor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ def build_chebi_graph(filepath: str | Path) -> nx.DiGraph:
117117

118118

119119
def get_hierarchy_subgraph(chebi_graph: nx.DiGraph) -> nx.DiGraph:
120-
"""Subgraph of ChEBI including only edges corresponding to hierarchical relations (is_a). Also removes nodes that are not connected by any is_a edges to other nodes."""
120+
"""Subgraph of ChEBI including only edges corresponding to hierarchical relations (is_a).
121+
Also removes nodes that are not connected by any is_a edges to other nodes."""
121122
return chebi_graph.edge_subgraph(
122123
(u, v) for u, v, d in chebi_graph.edges(data=True) if d.get("relation") == "is_a"
123124
)

0 commit comments

Comments
 (0)