Skip to content

Commit

Permalink
run black
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-p committed Sep 17, 2024
1 parent ff1bf2d commit 51da047
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
22 changes: 13 additions & 9 deletions src/algokit_subscriber_py/indexer_lookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,19 @@ def build_request(next_token: str | None = None) -> dict[str, Any]:
args: dict[str, Any] = {
"asset-id": asset_id,
"limit": pagination_limit or DEFAULT_INDEXER_MAX_API_RESOURCES_PER_ACCOUNT,
"include-all": options["include-all"]
if options and "include-all" in options
else None,
"currency-greater-than": options["currency-greater-than"]
if options and "currency-greater-than" in options
else None,
"currency-less-than": options["currency-less-than"]
if options and "currency-less-than" in options
else None,
"include-all": (
options["include-all"] if options and "include-all" in options else None
),
"currency-greater-than": (
options["currency-greater-than"]
if options and "currency-greater-than" in options
else None
),
"currency-less-than": (
options["currency-less-than"]
if options and "currency-less-than" in options
else None
),
}

if next_token:
Expand Down
4 changes: 1 addition & 3 deletions tests/test_subscriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,7 @@ def test_subscribes_correctly_with_poll_once() -> None:
assert [t["id"] for t in result["subscribed_transactions"]] == tx_ids

# Random transaction
results_2 = send_x_transactions(
1, generate_account(algorand, 3 * 10**6), algorand
)
results_2 = send_x_transactions(1, generate_account(algorand, 3 * 10**6), algorand)
last_txn_round_2 = results_2["last_txn_round"]
subscriber["subscriber"].poll_once()
assert len(subscriber["subscribed_test_account_txns"]) == 1
Expand Down

0 comments on commit 51da047

Please sign in to comment.