diff --git a/cognee/infrastructure/databases/graph/neo4j_driver/deadlock_retry.py b/cognee/infrastructure/databases/graph/neo4j_driver/deadlock_retry.py index 82d2a1c29..35d37383f 100644 --- a/cognee/infrastructure/databases/graph/neo4j_driver/deadlock_retry.py +++ b/cognee/infrastructure/databases/graph/neo4j_driver/deadlock_retry.py @@ -53,7 +53,7 @@ def deadlock_retry(max_retries=5): await wait() else: raise # Re-raise the original error - except DatabaseUnavailable as error: + except DatabaseUnavailable: if attempt >= max_retries: raise # Re-raise the original error diff --git a/cognee/tests/unit/infrastructure/databases/graph/neo4j_deadlock_test.py b/cognee/tests/unit/infrastructure/databases/graph/neo4j_deadlock_test.py index 401189080..a1e2d5bae 100644 --- a/cognee/tests/unit/infrastructure/databases/graph/neo4j_deadlock_test.py +++ b/cognee/tests/unit/infrastructure/databases/graph/neo4j_deadlock_test.py @@ -26,7 +26,7 @@ async def test_deadlock_retry(): wrapped_function = deadlock_retry(max_retries=2)(mock_function) result = await wrapped_function(self=None) - assert result == True, "Function should have succeded on second time" + assert result, "Function should have succeded on second time" async def test_deadlock_retry_exhaustive(): @@ -39,7 +39,7 @@ async def test_deadlock_retry_exhaustive(): wrapped_function = deadlock_retry(max_retries=2)(mock_function) result = await wrapped_function(self=None) - assert result == True, "Function should have succeded on second time" + assert result, "Function should have succeded on second time" if __name__ == "__main__":