refactor: E275 missing whitespace after keyword

This commit is contained in:
tecnovert 2022-07-31 20:01:49 +02:00
parent 1601a57aed
commit 1c4f208d27
No known key found for this signature in database
GPG Key ID: 8ED6D8750C4E3F93
29 changed files with 295 additions and 295 deletions

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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):

View File

@ -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()

View File

@ -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):

View File

@ -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__':