From c9d4e1ba1ff39c6fdd4190fabec8b25d5ed6662f Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Tue, 11 Aug 2026 15:14:45 +0100 Subject: [PATCH] CHIA-4339 Annotate wallet_interested_store.py (#21222) Annotate wallet_interested_store.py. --- chia/wallet/wallet_interested_store.py | 8 +++++--- mypy-exclusions.txt | 1 - 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/chia/wallet/wallet_interested_store.py b/chia/wallet/wallet_interested_store.py index 8b7f055ea1..d43691f8da 100644 --- a/chia/wallet/wallet_interested_store.py +++ b/chia/wallet/wallet_interested_store.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import Any + from chia_rs import CoinState from chia_rs.sized_bytes import bytes32 from chia_rs.sized_ints import uint32 @@ -15,7 +17,7 @@ class WalletInterestedStore: db_wrapper: DBWrapper2 @classmethod - async def create(cls, wrapper: DBWrapper2): + async def create(cls, wrapper: DBWrapper2) -> WalletInterestedStore: self = cls() self.db_wrapper = wrapper @@ -67,7 +69,7 @@ class WalletInterestedStore: row = await cursor.fetchone() if row is None: return None - return row[0] + return int(row[0]) async def add_interested_puzzle_hash(self, puzzle_hash: bytes32, wallet_id: int) -> None: async with self.db_wrapper.writer_maybe_transaction() as conn: @@ -110,7 +112,7 @@ class WalletInterestedStore: ) await cursor.close() - async def get_unacknowledged_tokens(self) -> list: + async def get_unacknowledged_tokens(self) -> list[dict[str, Any]]: """ Get a list of all unacknowledged CATs :return: A json style list of unacknowledged CATs diff --git a/mypy-exclusions.txt b/mypy-exclusions.txt index b73f80eb5d..4cd71fe4a7 100644 --- a/mypy-exclusions.txt +++ b/mypy-exclusions.txt @@ -15,7 +15,6 @@ chia.types.blockchain_format.program chia.wallet.puzzles.load_clvm chia.wallet.util.debug_spend_bundle chia.wallet.util.new_peak_queue -chia.wallet.wallet_interested_store chia.wallet.wallet_transaction_store chia._tests.clvm.test_puzzles chia._tests.clvm.test_singletons