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 # Can't get unspents return only if exactly one transaction exists
data = json.loads(self.readURL(self.base_url + '/address/transactions/' + address)) data = json.loads(self.readURL(self.base_url + '/address/transactions/' + address))
try: try:
assert(data['data']['list'] == 1) assert data['data']['list'] == 1
except Exception as ex: except Exception as ex:
self.log.debug('Explorer error: {}'.format(str(ex))) self.log.debug('Explorer error: {}'.format(str(ex)))
return None return None

View file

@ -356,7 +356,7 @@ class HttpHandler(BaseHTTPRequestHandler):
ensure(len(url_split) > 2, 'Bid ID not specified') ensure(len(url_split) > 2, 'Bid ID not specified')
try: try:
bid_id = bytes.fromhex(url_split[2]) bid_id = bytes.fromhex(url_split[2])
assert(len(bid_id) == 28) assert len(bid_id) == 28
except Exception: except Exception:
raise ValueError('Bad bid ID') raise ValueError('Bad bid ID')
swap_client = self.server.swap_client swap_client = self.server.swap_client

View file

@ -14,7 +14,7 @@ def rfc2440_hash_password(password, salt=None):
if salt is None: if salt is None:
salt = secrets.token_bytes(8) salt = secrets.token_bytes(8)
assert(len(salt) == 8) assert len(salt) == 8
hashbytes = salt + password.encode('utf-8') hashbytes = salt + password.encode('utf-8')
len_hashbytes = len(hashbytes) len_hashbytes = len(hashbytes)

View file

@ -322,7 +322,7 @@ class XmrTestBase(TestBase):
print('Error reading wallets', str(e)) print('Error reading wallets', str(e))
self.delay_event.wait(1) self.delay_event.wait(1)
assert(particl_blocks >= num_blocks) assert particl_blocks >= num_blocks
@classmethod @classmethod
def tearDownClass(cls): def tearDownClass(cls):

View file

@ -59,7 +59,7 @@ def run_test():
driver.get(base_url) driver.get(base_url)
link = driver.find_element_by_xpath('//a[@href="/offers"]') link = driver.find_element_by_xpath('//a[@href="/offers"]')
num_offers_end = int(link.text.split(':')[1].strip()) 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() driver.quit()

View file

@ -183,7 +183,7 @@ class Test(unittest.TestCase):
self.delay_event.wait(1) self.delay_event.wait(1)
logging.info('PART blocks: %d', callpartrpc(0, 'getblockchaininfo')['blocks']) logging.info('PART blocks: %d', callpartrpc(0, 'getblockchaininfo')['blocks'])
assert(particl_blocks >= num_blocks) assert particl_blocks >= num_blocks
@classmethod @classmethod
def tearDownClass(cls): def tearDownClass(cls):

View file

@ -126,7 +126,7 @@ class Test(XmrTestBase):
}).encode() }).encode()
try: try:
rv = json.loads(urlopen('http://127.0.0.1:12700/json/bids/{}'.format(bid0_id), data=data).read()) 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: except Exception as e:
print('Accept bid failed', str(e), rv) print('Accept bid failed', str(e), rv)
try: try:
@ -145,8 +145,8 @@ class Test(XmrTestBase):
rv1 = read_json_api(12700, 'bids/{}'.format(bid1_id)) rv1 = read_json_api(12700, 'bids/{}'.format(bid1_id))
if rv0['bid_state'] == 'Completed' and rv1['bid_state'] == 'Completed': if rv0['bid_state'] == 'Completed' and rv1['bid_state'] == 'Completed':
break break
assert(rv0['bid_state'] == 'Completed') assert rv0['bid_state'] == 'Completed'
assert(rv1['bid_state'] == 'Completed') assert rv1['bid_state'] == 'Completed'
if __name__ == '__main__': if __name__ == '__main__':