From 4adeea73390efcbeedb60a8ed41eb7334ba405e6 Mon Sep 17 00:00:00 2001 From: Byron Hambly Date: Fri, 8 Aug 2025 13:55:12 +0200 Subject: [PATCH] lint: fix issues from lint-python --- test/functional/test_framework/messages.py | 4 ++-- test/functional/wallet_importprunedfunds.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/test/functional/test_framework/messages.py b/test/functional/test_framework/messages.py index 090fa53f9f..dc676aa58e 100755 --- a/test/functional/test_framework/messages.py +++ b/test/functional/test_framework/messages.py @@ -605,7 +605,7 @@ class CTxOutValue: return r def setToAmount(self, amount): - if type(amount) == int: + if isinstance(amount, int): commit = [1]*9 for i in range(8): #8 bytes commit[8-i] = ((amount >> (i*8)) & 0xff) @@ -663,7 +663,7 @@ class CTxOut(): def __init__(self, nValue=CTxOutValue(), scriptPubKey=b'', nAsset=CTxOutAsset(BITCOIN_ASSET_OUT), nNonce=CTxOutNonce()): self.nAsset = nAsset - if type(nValue) is int: + if isinstance(nValue, int): self.nValue = CTxOutValue(nValue) else: self.nValue = nValue diff --git a/test/functional/wallet_importprunedfunds.py b/test/functional/wallet_importprunedfunds.py index e231b1ef72..d86ef3dc57 100755 --- a/test/functional/wallet_importprunedfunds.py +++ b/test/functional/wallet_importprunedfunds.py @@ -5,7 +5,6 @@ """Test the importprunedfunds and removeprunedfunds RPCs.""" from decimal import Decimal -from test_framework.address import key_to_p2wpkh from test_framework.blocktools import COINBASE_MATURITY from test_framework import liquid_addr from test_framework.key import ECKey