From cad731d973e115f31203a39d1d1130d61c6ddf06 Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Mon, 4 Nov 2024 17:39:51 +0100 Subject: [PATCH] Does it reduce complexity? --- neomodel/async_/match.py | 10 +++++----- neomodel/sync_/match.py | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/neomodel/async_/match.py b/neomodel/async_/match.py index 8f103c4f..6a2f9933 100644 --- a/neomodel/async_/match.py +++ b/neomodel/async_/match.py @@ -1505,11 +1505,11 @@ async def resolve_subgraph(self) -> list: for name, node in row.items(): if node.__class__ is self.source and "_" not in name: root_node = node - else: - if isinstance(node, list) and isinstance(node[0], list): - other_nodes[name] = node[0] - else: - other_nodes[name] = node + continue + if isinstance(node, list) and isinstance(node[0], list): + other_nodes[name] = node[0] + continue + other_nodes[name] = node results.append( self._to_subgraph(root_node, other_nodes, qbuilder._ast.subgraph) ) diff --git a/neomodel/sync_/match.py b/neomodel/sync_/match.py index 1bdfe660..966b2601 100644 --- a/neomodel/sync_/match.py +++ b/neomodel/sync_/match.py @@ -1505,11 +1505,11 @@ def resolve_subgraph(self) -> list: for name, node in row.items(): if node.__class__ is self.source and "_" not in name: root_node = node - else: - if isinstance(node, list) and isinstance(node[0], list): - other_nodes[name] = node[0] - else: - other_nodes[name] = node + continue + if isinstance(node, list) and isinstance(node[0], list): + other_nodes[name] = node[0] + continue + other_nodes[name] = node results.append( self._to_subgraph(root_node, other_nodes, qbuilder._ast.subgraph) )