Skip to content

Commit

Permalink
chore: black .
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 17, 2024
1 parent 2504734 commit bd887d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions eth_portfolio/_ledgers/address.py
Original file line number Diff line number Diff line change
Expand Up @@ -664,14 +664,13 @@ async def _load_new_objects(
for direction, (start, end) in product(["toAddress", "fromAddress"], block_ranges)
]


# NOTE: We only want tqdm progress bar when there is work to do
if len(block_ranges) == 1:
generator_function = a_sync.as_completed
else:
generator_function = partial( # type: ignore [assignment]
a_sync.as_completed, tqdm=True, desc=f"Trace Filters {self.address}"
)
)

if traces := [
trace for traces in generator_function(trace_filter_coros) for trace in await traces
Expand Down
4 changes: 1 addition & 3 deletions eth_portfolio/address.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,7 @@ async def external_balances(self, block: Optional[Block] = None) -> RemoteTokenB
Examples:
>>> external_balances = await address.external_balances(12345678)
"""
balances = await gather(
self.staking(block, sync=False), self.collateral(block, sync=False)
)
balances = await gather(self.staking(block, sync=False), self.collateral(block, sync=False))
return sum(balances) # type: ignore [arg-type, return-value]

# Assets
Expand Down

0 comments on commit bd887d4

Please sign in to comment.