From ee079a683b4e63f1863b234f3de79ca6603eb0ff Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 16 Oct 2020 16:00:02 +0100 Subject: [PATCH] test: Fix various pyflakes warnings --- qa/rpc-tests/test_framework/equihash.py | 8 ++++---- qa/rpc-tests/test_framework/mininode.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/qa/rpc-tests/test_framework/equihash.py b/qa/rpc-tests/test_framework/equihash.py index d74aa6e13..e05544fb4 100755 --- a/qa/rpc-tests/test_framework/equihash.py +++ b/qa/rpc-tests/test_framework/equihash.py @@ -108,9 +108,9 @@ def hash_xi(digest, xi): def count_zeroes(h): # Convert to binary string if type(h) == bytearray: - h = ''.join('{0:08b}'.format(x, 'b') for x in h) + h = ''.join('{0:08b}'.format(x) for x in h) else: - h = ''.join('{0:08b}'.format(ord(x), 'b') for x in h) + h = ''.join('{0:08b}'.format(ord(x)) for x in h) # Count leading zeroes return (h+'1').index('1') @@ -283,9 +283,9 @@ def zcash_person(n, k): def print_hash(h): if type(h) == bytearray: - return ''.join('{0:02x}'.format(x, 'x') for x in h) + return ''.join('{0:02x}'.format(x) for x in h) else: - return ''.join('{0:02x}'.format(ord(x), 'x') for x in h) + return ''.join('{0:02x}'.format(ord(x)) for x in h) def validate_params(n, k): if (k >= n): diff --git a/qa/rpc-tests/test_framework/mininode.py b/qa/rpc-tests/test_framework/mininode.py index 40eca6b2a..04a7ef773 100755 --- a/qa/rpc-tests/test_framework/mininode.py +++ b/qa/rpc-tests/test_framework/mininode.py @@ -575,7 +575,7 @@ class JSDescription(object): return r def __repr__(self): - return "JSDescription(vpub_old=%i.%08i vpub_new=%i.%08i anchor=%064x onetimePubKey=%064x randomSeed=%064x proof=%r)" \ + return "JSDescription(vpub_old=%i vpub_new=%i anchor=%064x onetimePubKey=%064x randomSeed=%064x proof=%r)" \ % (self.vpub_old, self.vpub_new, self.anchor, self.onetimePubKey, self.randomSeed, self.proof)