Merge pull request #102 from roberthdevries/fix-various-minor-issues-caught-by-ruff

Fix various minor issues caught by `ruff check` in default mode.
pull/106/head
David Garske 2026-04-15 15:00:53 -07:00 committed by GitHub
commit 1ec10b3c0d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -81,7 +81,7 @@ def wolfssl_lib_dir(local_wolfssl=None, fips=False):
lib_names.append("libwolfssl.so")
found = False
for root, dirs, files in os.walk(local_wolfssl):
for root, _dirs, files in os.walk(local_wolfssl):
for name in lib_names:
if name in files:
lib_dir = root

View File

@ -605,7 +605,7 @@ if _lib.ECC_ENABLED:
# invalid signature
ret = ecc_public.verify_raw(r, s[:-1], plaintext)
assert ret == False
assert not ret
# private object holds both private and public info, so it can also verify
# using the known public key.

View File

@ -183,7 +183,7 @@ class _Cipher(object):
raise ValueError(
"empty string not allowed")
if len(string) % self.block_size and not self.mode == MODE_CTR and not "ChaCha" in self._native_type:
if len(string) % self.block_size and not self.mode == MODE_CTR and "ChaCha" not in self._native_type:
raise ValueError(
"string must be a multiple of %d in length" % self.block_size)