Skip to content

Commit 1ec10b3

Browse files
authored
Merge pull request #102 from roberthdevries/fix-various-minor-issues-caught-by-ruff
Fix various minor issues caught by `ruff check` in default mode.
2 parents 0297859 + da0eb45 commit 1ec10b3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

scripts/build_ffi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def wolfssl_lib_dir(local_wolfssl=None, fips=False):
8181
lib_names.append("libwolfssl.so")
8282

8383
found = False
84-
for root, dirs, files in os.walk(local_wolfssl):
84+
for root, _dirs, files in os.walk(local_wolfssl):
8585
for name in lib_names:
8686
if name in files:
8787
lib_dir = root

tests/test_ciphers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ def test_ecc_sign_verify_raw(ecc_private, ecc_public):
605605

606606
# invalid signature
607607
ret = ecc_public.verify_raw(r, s[:-1], plaintext)
608-
assert ret == False
608+
assert not ret
609609

610610
# private object holds both private and public info, so it can also verify
611611
# using the known public key.

wolfcrypt/ciphers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def encrypt(self, string):
183183
raise ValueError(
184184
"empty string not allowed")
185185

186-
if len(string) % self.block_size and not self.mode == MODE_CTR and not "ChaCha" in self._native_type:
186+
if len(string) % self.block_size and not self.mode == MODE_CTR and "ChaCha" not in self._native_type:
187187
raise ValueError(
188188
"string must be a multiple of %d in length" % self.block_size)
189189

0 commit comments

Comments
 (0)