Skip to content

Commit

Permalink
Fix linter issue
Browse files Browse the repository at this point in the history
  • Loading branch information
trizin committed Sep 9, 2023
1 parent 000e443 commit 7dce389
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/check_testnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
from pdr_backend.util.subgraph import query_subgraph


def print_stats(contract, field_name, threshold=0.9):
count = sum(1 for _ in contract["slots"])
with_field = sum(1 for slot in contract["slots"] if len(slot[field_name]) > 0)
def print_stats(contract_dict, field_name, threshold=0.9):
count = sum(1 for _ in contract_dict["slots"])
with_field = sum(1 for slot in contract_dict["slots"] if len(slot[field_name]) > 0)

status = "OK" if with_field / count > threshold else "FAIL"
token_name = contract["token"]["name"]
token_name = contract_dict["token"]["name"]

print(f"{token_name}: {with_field}/{count} - {status}")

Expand Down

0 comments on commit 7dce389

Please sign in to comment.