From 5c9ee17f07d46b62eb076ba56bee04b40bb31699 Mon Sep 17 00:00:00 2001 From: Christopher Whelan Date: Wed, 8 May 2024 20:45:28 -0700 Subject: [PATCH] Remove unnecessary type hint --- src/rp2/plugin/report/jp/tax_report_jp.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/rp2/plugin/report/jp/tax_report_jp.py b/src/rp2/plugin/report/jp/tax_report_jp.py index 538c414..0c00be1 100644 --- a/src/rp2/plugin/report/jp/tax_report_jp.py +++ b/src/rp2/plugin/report/jp/tax_report_jp.py @@ -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