66from chia_rs import ConsensusConstants
77from chia_rs .sized_bytes import bytes32
88from chia_rs .sized_ints import uint64
9- from typing_extensions import NotRequired , Self , TypedDict , TypeVar , Unpack
9+ from typing_extensions import NotRequired , Self , TypedDict , Unpack
1010
1111from chia .consensus .default_constants import DEFAULT_CONSTANTS
1212from chia .types .blockchain_format .coin import Coin
@@ -88,7 +88,7 @@ def autofill(
8888
8989 @classmethod
9090 def from_json_dict (cls , json_dict : dict [str , Any ]) -> Self :
91- if "excluded_coins" in json_dict and json_dict [ "excluded_coins" ] is not None :
91+ if json_dict . get ( "excluded_coins" ) is not None :
9292 excluded_coins : list [Coin ] = [Coin .from_json_dict (c ) for c in json_dict ["excluded_coins" ]]
9393 excluded_coin_ids : list [str ] = [c .name ().hex () for c in excluded_coins ]
9494 if "excluded_coin_ids" in json_dict :
@@ -99,13 +99,10 @@ def from_json_dict(cls, json_dict: dict[str, Any]) -> Self:
9999
100100 # This function is purely for ergonomics
101101 # But creates a small linting complication
102- def override (self : _T_CoinSelectionConfigLoader , ** kwargs : Any ) -> _T_CoinSelectionConfigLoader : # noqa: PYI019
102+ def override (self , ** kwargs : Any ) -> Self :
103103 return dataclasses .replace (self , ** kwargs )
104104
105105
106- _T_CoinSelectionConfigLoader = TypeVar ("_T_CoinSelectionConfigLoader" , bound = CoinSelectionConfigLoader )
107-
108-
109106@streamable
110107@dataclasses .dataclass (frozen = True )
111108class TXConfigLoader (CoinSelectionConfigLoader ):
0 commit comments