diff --git a/.arclint b/.arclint --- a/.arclint +++ b/.arclint @@ -36,7 +36,7 @@ "(^contrib/apple-sdk-tools/)" ], "flags": [ - "--ignore=A001,A003,E303,E305,E501,E704,W503,W504", + "--ignore=A003,E303,E305,E501,E704,W503,W504", "--require-plugins=flake8-comprehensions,flake8-builtins" ] }, diff --git a/test/functional/abc_rpc_isfinal.py b/test/functional/abc_rpc_isfinal.py --- a/test/functional/abc_rpc_isfinal.py +++ b/test/functional/abc_rpc_isfinal.py @@ -77,10 +77,10 @@ self.log.info("Check block ancestors are finalized as well") tip_height = node.getblockheader(blockhash)['height'] for height in range(0, tip_height): - hash = node.getblockhash(height) - assert node.isfinalblock(hash) - txid = node.getblock(hash)['tx'][0] - assert node.isfinaltransaction(txid, hash) + blockhash = node.getblockhash(height) + assert node.isfinalblock(blockhash) + txid = node.getblock(blockhash)['tx'][0] + assert node.isfinaltransaction(txid, blockhash) if self.is_wallet_compiled(): self.log.info("Check mempool transactions are not finalized") diff --git a/test/functional/p2p_add_connections.py b/test/functional/p2p_add_connections.py --- a/test/functional/p2p_add_connections.py +++ b/test/functional/p2p_add_connections.py @@ -203,12 +203,12 @@ f"Randomly insert outbounds of various types {iterations} times") for _ in range(iterations): - type = random.choice(list(remaining_outbounds)) - if remaining_outbounds[type] <= 0: + conn_type = random.choice(list(remaining_outbounds)) + if remaining_outbounds[conn_type] <= 0: continue - self.add_outbounds(self.nodes[0], 1, type) - remaining_outbounds[type] -= 1 + self.add_outbounds(self.nodes[0], 1, conn_type) + remaining_outbounds[conn_type] -= 1 check_node_connections( node=self.nodes[0], diff --git a/test/functional/rpc_rawtransaction.py b/test/functional/rpc_rawtransaction.py --- a/test/functional/rpc_rawtransaction.py +++ b/test/functional/rpc_rawtransaction.py @@ -202,13 +202,13 @@ {address: 99}, {address2: 99}, {'data': '99'}]), ) - for type in ["legacy"]: - addr = self.nodes[0].getnewaddress("", type) + for addr_type in ["legacy"]: + addr = self.nodes[0].getnewaddress("", addr_type) addrinfo = self.nodes[0].getaddressinfo(addr) pubkey = addrinfo["scriptPubKey"] self.log.info( - f'sendrawtransaction with missing prevtx info ({type})') + f'sendrawtransaction with missing prevtx info ({addr_type})') # Test `signrawtransactionwithwallet` invalid `prevtxs` inputs = [{'txid': txid, 'vout': 3, 'sequence': 1000}] diff --git a/test/functional/wallet_coinbase_category.py b/test/functional/wallet_coinbase_category.py --- a/test/functional/wallet_coinbase_category.py +++ b/test/functional/wallet_coinbase_category.py @@ -33,8 +33,8 @@ # Generate one block to an address address = self.nodes[0].getnewaddress() self.generatetoaddress(self.nodes[0], 1, address) - hash = self.nodes[0].getbestblockhash() - txid = self.nodes[0].getblock(hash)["tx"][0] + blockhash = self.nodes[0].getbestblockhash() + txid = self.nodes[0].getblock(blockhash)["tx"][0] # Coinbase transaction is immature after 1 confirmation self.assert_category("immature", address, txid, 0) @@ -50,7 +50,7 @@ self.assert_category("generate", address, txid, 100) # Orphan block that paid to address - self.nodes[0].invalidateblock(hash) + self.nodes[0].invalidateblock(blockhash) # Coinbase transaction is now orphaned self.assert_category("orphan", address, txid, 100) diff --git a/test/functional/wallet_send.py b/test/functional/wallet_send.py --- a/test/functional/wallet_send.py +++ b/test/functional/wallet_send.py @@ -372,18 +372,18 @@ txid = res["txid"] # Although the wallet finishes the transaction, it can't be added to # the mempool yet: - hex = self.nodes[0].gettransaction(res["txid"])["hex"] - res = self.nodes[0].testmempoolaccept([hex]) + tx_hex = self.nodes[0].gettransaction(res["txid"])["hex"] + res = self.nodes[0].testmempoolaccept([tx_hex]) assert not res[0]["allowed"] assert_equal(res[0]["reject-reason"], "bad-txns-nonfinal") # It shouldn't be confirmed in the next block self.generate(self.nodes[0], 1) assert_equal(self.nodes[0].gettransaction(txid)["confirmations"], 0) # The mempool should allow it now: - res = self.nodes[0].testmempoolaccept([hex]) + res = self.nodes[0].testmempoolaccept([tx_hex]) assert res[0]["allowed"] # Don't wait for wallet to add it to the mempool: - res = self.nodes[0].sendrawtransaction(hex) + res = self.nodes[0].sendrawtransaction(tx_hex) self.generate(self.nodes[0], 1) assert_equal(self.nodes[0].gettransaction(txid)["confirmations"], 1)