Skip to content

Commit 5cf3c60

Browse files
committed
Merge #9607: Remove redundant semicolons in Python code
5cdf106 Remove redundant semicolons in Python code (practicalswift)
2 parents 7884956 + 5cdf106 commit 5cf3c60

File tree

8 files changed

+16
-16
lines changed

8 files changed

+16
-16
lines changed

contrib/devtools/clang-format-diff.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def main():
128128
line_count = int(match.group(3))
129129
if line_count == 0:
130130
continue
131-
end_line = start_line + line_count - 1;
131+
end_line = start_line + line_count - 1
132132
lines_by_file.setdefault(filename, []).extend(
133133
['-lines', str(start_line) + ':' + str(end_line)])
134134

@@ -147,7 +147,7 @@ def main():
147147
stderr=None, stdin=subprocess.PIPE)
148148
stdout, stderr = p.communicate()
149149
if p.returncode != 0:
150-
sys.exit(p.returncode);
150+
sys.exit(p.returncode)
151151

152152
if not args.i:
153153
with open(filename) as f:

contrib/devtools/optimize-pngs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def content_hash(filename):
3939
if extension.lower() == '.png':
4040
print("optimizing "+file+"..."),
4141
file_path = os.path.join(absFolder, file)
42-
fileMetaMap = {'file' : file, 'osize': os.path.getsize(file_path), 'sha256Old' : file_hash(file_path)};
42+
fileMetaMap = {'file' : file, 'osize': os.path.getsize(file_path), 'sha256Old' : file_hash(file_path)}
4343
fileMetaMap['contentHashPre'] = content_hash(file_path)
4444

4545
pngCrushOutput = ""

contrib/zmq/zmq_sub.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
msg = zmqSubSocket.recv_multipart()
2323
topic = str(msg[0])
2424
body = msg[1]
25-
sequence = "Unknown";
25+
sequence = "Unknown"
2626
if len(msg[-1]) == 4:
2727
msgSequence = struct.unpack('<I', msg[-1])[-1]
2828
sequence = str(msgSequence)

qa/rpc-tests/fundrawtransaction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ def run_test(self):
226226
assert(False)
227227
rawtxfund = self.nodes[2].fundrawtransaction(rawtx, {'changeAddress': change, 'changePosition': 0})
228228
dec_tx = self.nodes[2].decoderawtransaction(rawtxfund['hex'])
229-
out = dec_tx['vout'][0];
229+
out = dec_tx['vout'][0]
230230
assert_equal(change, out['scriptPubKey']['addresses'][0])
231231

232232

qa/rpc-tests/importmulti.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def run_test (self):
108108
"scriptPubKey": address['scriptPubKey'],
109109
"pubkeys": [ address['pubkey'] ],
110110
"internal": True
111-
}];
111+
}]
112112
result = self.nodes[1].importmulti(request)
113113
assert_equal(result[0]['success'], True)
114114
address_assert = self.nodes[1].validateaddress(address['address'])
@@ -121,7 +121,7 @@ def run_test (self):
121121
request = [{
122122
"scriptPubKey": address['scriptPubKey'],
123123
"pubkeys": [ address['pubkey'] ]
124-
}];
124+
}]
125125
result = self.nodes[1].importmulti(request)
126126
assert_equal(result[0]['success'], False)
127127
assert_equal(result[0]['error']['code'], -8)
@@ -197,7 +197,7 @@ def run_test (self):
197197
self.nodes[1].generate(100)
198198
transactionid = self.nodes[1].sendtoaddress(multi_sig_script['address'], 10.00)
199199
self.nodes[1].generate(1)
200-
transaction = self.nodes[1].gettransaction(transactionid);
200+
transaction = self.nodes[1].gettransaction(transactionid)
201201

202202
print("Should import a p2sh")
203203
result = self.nodes[1].importmulti([{
@@ -222,7 +222,7 @@ def run_test (self):
222222
self.nodes[1].generate(100)
223223
transactionid = self.nodes[1].sendtoaddress(multi_sig_script['address'], 10.00)
224224
self.nodes[1].generate(1)
225-
transaction = self.nodes[1].gettransaction(transactionid);
225+
transaction = self.nodes[1].gettransaction(transactionid)
226226

227227
print("Should import a p2sh with respective redeem script")
228228
result = self.nodes[1].importmulti([{
@@ -246,7 +246,7 @@ def run_test (self):
246246
self.nodes[1].generate(100)
247247
transactionid = self.nodes[1].sendtoaddress(multi_sig_script['address'], 10.00)
248248
self.nodes[1].generate(1)
249-
transaction = self.nodes[1].gettransaction(transactionid);
249+
transaction = self.nodes[1].gettransaction(transactionid)
250250

251251
print("Should import a p2sh with respective redeem script and private keys")
252252
result = self.nodes[1].importmulti([{
@@ -270,7 +270,7 @@ def run_test (self):
270270
self.nodes[1].generate(100)
271271
transactionid = self.nodes[1].sendtoaddress(multi_sig_script['address'], 10.00)
272272
self.nodes[1].generate(1)
273-
transaction = self.nodes[1].gettransaction(transactionid);
273+
transaction = self.nodes[1].gettransaction(transactionid)
274274

275275
print("Should import a p2sh with respective redeem script and private keys")
276276
result = self.nodes[1].importmulti([{
@@ -312,7 +312,7 @@ def run_test (self):
312312
"scriptPubKey": address['scriptPubKey'],
313313
"pubkeys": [ address2['pubkey'] ],
314314
"internal": True
315-
}];
315+
}]
316316
result = self.nodes[1].importmulti(request)
317317
assert_equal(result[0]['success'], False)
318318
assert_equal(result[0]['error']['code'], -5)

qa/rpc-tests/p2p-feefilter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ def allInvsMatch(invsExpected, testnode):
2121
for x in range(60):
2222
with mininode_lock:
2323
if (sorted(invsExpected) == sorted(testnode.txinvs)):
24-
return True;
24+
return True
2525
time.sleep(1)
26-
return False;
26+
return False
2727

2828
# TestNode: bare-bones "peer". Used to track which invs are received from a node
2929
# and to send the node feefilter messages.

qa/rpc-tests/p2p-segwit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1662,7 +1662,7 @@ def test_witness_sigops(self):
16621662
# too many sigops (contributing to legacy sigop count).
16631663
checksig_count = (extra_sigops_available // 4) + 1
16641664
scriptPubKey_checksigs = CScript([OP_CHECKSIG]*checksig_count)
1665-
tx2.vout.append(CTxOut(0, scriptPubKey_checksigs));
1665+
tx2.vout.append(CTxOut(0, scriptPubKey_checksigs))
16661666
tx2.vin.pop()
16671667
tx2.wit.vtxinwit.pop()
16681668
tx2.vout[0].nValue -= tx.vout[-2].nValue

qa/rpc-tests/segwit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def addlength(script):
3939
return scriptlen + script
4040

4141
def create_witnessprogram(version, node, utxo, pubkey, encode_p2sh, amount):
42-
pkscript = witness_script(version, pubkey);
42+
pkscript = witness_script(version, pubkey)
4343
if (encode_p2sh):
4444
p2sh_hash = bytes_to_hex_str(ripemd160(sha256(hex_str_to_bytes(pkscript))))
4545
pkscript = "a914"+p2sh_hash+"87"

0 commit comments

Comments
 (0)