Merge bitcoin/bitcoin#34154: test: Enable ruff E713 lint
fab300b378test: Enable ruff E713 lint (MarcoFalke) Pull request description: Membership tests of the form `not item in stuff` may be confusing, because they could be read as `(not item) in stuff`, which is different. So enable the ruff E713 lint, which should also help to avoid having to go through review cycles for this. ACKs for top commit: bensig: ACKfab300b378l0rinc: ACKfab300b378rkrux: lgtm crACKfab300b378Tree-SHA512: c3eaf0fbe0dd22d8e04b896e98adaf28162fb748e6f7f5ebfd73b2020da66046bf8f0c1a27db5da05250366b98ded8c4a55d53edd8fa050e80521aee42ba3c5a
This commit is contained in:
10 files changed
+18
-17
No files matched your search
@@ -25,7 +25,7 @@ def descsum_expand(s):
|
||||
groups = []
|
||||
symbols = []
|
||||
for c in s:
|
||||
if not c in INPUT_CHARSET:
|
||||
if c not in INPUT_CHARSET:
|
||||
return None
|
||||
v = INPUT_CHARSET.find(c)
|
||||
symbols.append(v & 31)
|
||||
@@ -47,7 +47,7 @@ def descsum_create(s):
|
||||
|
||||
def descsum_check(s, require=True):
|
||||
"""Verify that the checksum is correct in a descriptor"""
|
||||
if not '#' in s:
|
||||
if '#' not in s:
|
||||
return not require
|
||||
if s[-9] != '#':
|
||||
return False
|
||||
|
||||
Reference in new issue
Block a user