Skip to content

Commit

Permalink
Improve head task check using any
Browse files Browse the repository at this point in the history
  • Loading branch information
sitaowang1998 committed Dec 18, 2024
1 parent ea60758 commit b3c7153
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tests/integration/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@ def create_connection(storage_url: str):


def is_head_task(task_id: uuid.UUID, dependencies: List[Tuple[uuid.UUID, uuid.UUID]]):
for dependency in dependencies:
if dependency[1] == task_id:
return False
return True
return not any(dependency[1] == task_id for dependency in dependencies)


storage_url = "jdbc:mariadb://localhost:3306/spider_test?user=root&password=password"
Expand Down

0 comments on commit b3c7153

Please sign in to comment.