Merge pull request #818 from YanSte/fix-lint

Fixed lint
This commit is contained in:
Yannick Stephan
2025-02-17 18:39:37 +01:00
committed by GitHub

View File

@@ -307,20 +307,35 @@ class Neo4JStorage(BaseGraphStorage):
f"and {entity_name_label_target}: {str(e)}"
)
# Return default edge properties on error
return {"weight": 0.0, "description": None, "keywords": None, "source_id": None}
return {
"weight": 0.0,
"description": None,
"keywords": None,
"source_id": None,
}
logger.debug(
f"{inspect.currentframe().f_code.co_name}: No edge found between {entity_name_label_source} and {entity_name_label_target}"
)
# Return default edge properties when no edge found
return {"weight": 0.0, "description": None, "keywords": None, "source_id": None}
return {
"weight": 0.0,
"description": None,
"keywords": None,
"source_id": None,
}
except Exception as e:
logger.error(
f"Error in get_edge between {source_node_id} and {target_node_id}: {str(e)}"
)
# Return default edge properties on error
return {"weight": 0.0, "description": None, "keywords": None, "source_id": None}
return {
"weight": 0.0,
"description": None,
"keywords": None,
"source_id": None,
}
async def get_node_edges(self, source_node_id: str) -> list[tuple[str, str]] | None:
node_label = source_node_id.strip('"')