refactor: E275 missing whitespace after keyword
This commit is contained in:
parent
1601a57aed
commit
1c4f208d27
@ -75,7 +75,7 @@ class ExplorerBitAps(Explorer):
|
||||
# Can't get unspents return only if exactly one transaction exists
|
||||
data = json.loads(self.readURL(self.base_url + '/address/transactions/' + address))
|
||||
try:
|
||||
assert(data['data']['list'] == 1)
|
||||
assert data['data']['list'] == 1
|
||||
except Exception as ex:
|
||||
self.log.debug('Explorer error: {}'.format(str(ex)))
|
||||
return None
|
||||
|
@ -356,7 +356,7 @@ class HttpHandler(BaseHTTPRequestHandler):
|
||||
ensure(len(url_split) > 2, 'Bid ID not specified')
|
||||
try:
|
||||
bid_id = bytes.fromhex(url_split[2])
|
||||
assert(len(bid_id) == 28)
|
||||
assert len(bid_id) == 28
|
||||
except Exception:
|
||||
raise ValueError('Bad bid ID')
|
||||
swap_client = self.server.swap_client
|
||||
|
@ -14,7 +14,7 @@ def rfc2440_hash_password(password, salt=None):
|
||||
|
||||
if salt is None:
|
||||
salt = secrets.token_bytes(8)
|
||||
assert(len(salt) == 8)
|
||||
assert len(salt) == 8
|
||||
|
||||
hashbytes = salt + password.encode('utf-8')
|
||||
len_hashbytes = len(hashbytes)
|
||||
|
@ -322,7 +322,7 @@ class XmrTestBase(TestBase):
|
||||
print('Error reading wallets', str(e))
|
||||
|
||||
self.delay_event.wait(1)
|
||||
assert(particl_blocks >= num_blocks)
|
||||
assert particl_blocks >= num_blocks
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
|
@ -59,7 +59,7 @@ def run_test():
|
||||
driver.get(base_url)
|
||||
link = driver.find_element_by_xpath('//a[@href="/offers"]')
|
||||
num_offers_end = int(link.text.split(':')[1].strip())
|
||||
assert(num_offers_end == num_offers_start + 1)
|
||||
assert num_offers_end == num_offers_start + 1
|
||||
|
||||
driver.quit()
|
||||
|
||||
|
@ -183,7 +183,7 @@ class Test(unittest.TestCase):
|
||||
self.delay_event.wait(1)
|
||||
|
||||
logging.info('PART blocks: %d', callpartrpc(0, 'getblockchaininfo')['blocks'])
|
||||
assert(particl_blocks >= num_blocks)
|
||||
assert particl_blocks >= num_blocks
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
|
@ -126,7 +126,7 @@ class Test(XmrTestBase):
|
||||
}).encode()
|
||||
try:
|
||||
rv = json.loads(urlopen('http://127.0.0.1:12700/json/bids/{}'.format(bid0_id), data=data).read())
|
||||
assert(rv['bid_state'] == 'Accepted')
|
||||
assert rv['bid_state'] == 'Accepted'
|
||||
except Exception as e:
|
||||
print('Accept bid failed', str(e), rv)
|
||||
try:
|
||||
@ -145,8 +145,8 @@ class Test(XmrTestBase):
|
||||
rv1 = read_json_api(12700, 'bids/{}'.format(bid1_id))
|
||||
if rv0['bid_state'] == 'Completed' and rv1['bid_state'] == 'Completed':
|
||||
break
|
||||
assert(rv0['bid_state'] == 'Completed')
|
||||
assert(rv1['bid_state'] == 'Completed')
|
||||
assert rv0['bid_state'] == 'Completed'
|
||||
assert rv1['bid_state'] == 'Completed'
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
Loading…
Reference in New Issue
Block a user