Skip to content

Commit 360ab04

Browse files
committed
fix: is_exist for KG
1 parent 372866a commit 360ab04

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pyrdf2vec/graphs/kg.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,9 +374,7 @@ def is_exist(self, entities: Entities) -> bool:
374374
responses = [self.connector.fetch(query) for query in queries]
375375
responses = [res["boolean"] for res in responses]
376376
return False not in responses
377-
return not all(
378-
[Vertex(entity) in self._vertices for entity in entities]
379-
)
377+
return all([Vertex(entity) in self._vertices for entity in entities])
380378

381379
def remove_edge(self, v1: Vertex, v2: Vertex) -> bool:
382380
"""Removes the edge (v1 -> v2) if present.

0 commit comments

Comments
 (0)