Skip to content

Commit

Permalink
Remove unnecessary type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
qwhelan committed May 9, 2024
1 parent 5446dd7 commit 5c9ee17
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/rp2/plugin/report/jp/tax_report_jp.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,14 @@ def __generate_asset(self, computed_data: ComputedData, output_file: Any) -> Non
in_transaction_set: TransactionSet = computed_data.in_transaction_set
out_transaction_set: TransactionSet = computed_data.out_transaction_set
intra_transaction_set: TransactionSet = computed_data.intra_transaction_set
entry: AbstractEntry
entry: AbstractTransaction
year: int
years_2_transaction_sets: Dict[int, List[AbstractTransaction]] = {}
previous_year_row_offset: int = 0

# Sort all in and out transactions by year, the fee from intra transactions must be reported
for entry in chain(in_transaction_set, out_transaction_set, intra_transaction_set): # type: ignore
transaction: AbstractTransaction = cast(AbstractTransaction, entry)
years_2_transaction_sets.setdefault(transaction.timestamp.year, []).append(entry)
years_2_transaction_sets.setdefault(entry.timestamp.year, []).append(entry)

for year, transaction_set in years_2_transaction_sets.items():
# Sort the transactions by timestamp and generate sheet by year
Expand Down

0 comments on commit 5c9ee17

Please sign in to comment.