Skip to content

Commit

Permalink
linty lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jack60612 committed Apr 13, 2022
1 parent 5ebc1ac commit adbf7f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion chia/wallet/coin_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ def check_for_exact_match(coin_list: List[Coin], target: uint64) -> Optional[Coi
def select_smallest_coin_over_target(smaller_coin_amount: int, valid_spendable_coin_list: List[Coin]) -> Coin:
if smaller_coin_amount >= len(valid_spendable_coin_list):
raise ValueError(
"There are no coins greater then the target. This is caused by having too many dust coins. Try making a smaller transaction to condense the dust."
"There are no coins greater then the target."
" This is caused by having too many dust coins. Try making a smaller transaction to condense the dust."
)
if smaller_coin_amount > 0: # in case we only have bigger coins.
greater_coins = valid_spendable_coin_list[:-smaller_coin_amount]
Expand Down
4 changes: 2 additions & 2 deletions tests/wallet/test_coin_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ async def test_coin_selection_failure(self, a_hash: bytes32) -> None:
# test for failure
with pytest.raises(ValueError):
for target_amount in [10000, 9999]:
result: Set[Coin] = await select_coins(
await select_coins(
spendable_amount,
DEFAULT_CONSTANTS.MAX_COIN_AMOUNT,
coin_list,
Expand All @@ -135,7 +135,7 @@ async def test_coin_selection_failure(self, a_hash: bytes32) -> None:
# test not enough coin failure.
with pytest.raises(ValueError):
for target_amount in [10001, 20000]:
result: Set[Coin] = await select_coins(
await select_coins(
spendable_amount,
DEFAULT_CONSTANTS.MAX_COIN_AMOUNT,
coin_list,
Expand Down

0 comments on commit adbf7f4

Please sign in to comment.