Skip to content

Commit

Permalink
Black reformatting
Browse files Browse the repository at this point in the history
  • Loading branch information
eprbell committed Jan 1, 2025
1 parent 4c85c3d commit e374b36
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/rp2/in_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def to_string(self, indent: int = 0, repr_format: bool = True, extra_data: Optio
f"is_taxable={stringify(self.is_taxable())}",
f"fiat_taxable_amount={self.fiat_taxable_amount:.4f}",
f"from_lot={self.from_lot.internal_id if self.from_lot is not None else ''}",
f"to_lots={', '.join(to_lots_string_parts)}"
f"to_lots={', '.join(to_lots_string_parts)}",
]
if extra_data:
class_specific_data.extend(extra_data)
Expand Down
9 changes: 8 additions & 1 deletion src/rp2/out_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,14 @@ def __init__(
self.__fiat_fee = configuration.type_check_positive_decimal("fiat_fee", fiat_fee)
self.__fiat_out_with_fee = self.__fiat_out_no_fee + self.__fiat_fee

if self.transaction_type not in (TransactionType.DONATE, TransactionType.FEE, TransactionType.GIFT, TransactionType.LOST, TransactionType.SELL, TransactionType.STAKING):
if self.transaction_type not in (
TransactionType.DONATE,
TransactionType.FEE,
TransactionType.GIFT,
TransactionType.LOST,
TransactionType.SELL,
TransactionType.STAKING,
):
raise RP2ValueError(
f"{self.asset} {type(self).__name__} ({self.timestamp}, id {self.internal_id}): invalid transaction type {self.transaction_type}"
)
Expand Down

0 comments on commit e374b36

Please sign in to comment.