Fix "== None" linter fails
Credit to Zoltan Konder for pointing me to this issue.
This commit is contained in:
@@ -444,7 +444,7 @@ class BitBox02Client(HardwareClientBase):
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
if tx_script_type == None:
|
if tx_script_type is None:
|
||||||
tx_script_type = txin.script_type
|
tx_script_type = txin.script_type
|
||||||
elif tx_script_type != txin.script_type:
|
elif tx_script_type != txin.script_type:
|
||||||
raise Exception("Cannot mix different input script types")
|
raise Exception("Cannot mix different input script types")
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ class CKCCClient(HardwareClientBase):
|
|||||||
resp = self.dev.send_recv(CCProtocolPacker.sign_transaction(dlen, chk, finalize=finalize),
|
resp = self.dev.send_recv(CCProtocolPacker.sign_transaction(dlen, chk, finalize=finalize),
|
||||||
timeout=None)
|
timeout=None)
|
||||||
|
|
||||||
if resp != None:
|
if resp is not None:
|
||||||
raise ValueError(resp)
|
raise ValueError(resp)
|
||||||
|
|
||||||
@runs_in_hwd_thread
|
@runs_in_hwd_thread
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ def numberToByteArray(n, howManyBytes=None):
|
|||||||
not be larger. The returned bytearray will contain a big-endian
|
not be larger. The returned bytearray will contain a big-endian
|
||||||
encoding of the input integer (n).
|
encoding of the input integer (n).
|
||||||
"""
|
"""
|
||||||
if howManyBytes == None:
|
if howManyBytes is None:
|
||||||
howManyBytes = numBytes(n)
|
howManyBytes = numBytes(n)
|
||||||
b = bytearray(howManyBytes)
|
b = bytearray(howManyBytes)
|
||||||
for count in range(howManyBytes-1, -1, -1):
|
for count in range(howManyBytes-1, -1, -1):
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class TestBolt11(ElectrumTestCase):
|
|||||||
b.tags = [t for t in b.tags if t[0] != 'h' and t[0] != 'n']
|
b.tags = [t for t in b.tags if t[0] != 'h' and t[0] != 'n']
|
||||||
|
|
||||||
assert b.pubkey.serialize() == PUBKEY, (hexlify(b.pubkey.serialize()), hexlify(PUBKEY))
|
assert b.pubkey.serialize() == PUBKEY, (hexlify(b.pubkey.serialize()), hexlify(PUBKEY))
|
||||||
assert b.signature != None
|
assert b.signature is not None
|
||||||
|
|
||||||
# Unset these, they are generated during encoding/decoding
|
# Unset these, they are generated during encoding/decoding
|
||||||
b.pubkey = None
|
b.pubkey = None
|
||||||
|
|||||||
Reference in New Issue
Block a user