diff --git a/scripts/build_ffi.py b/scripts/build_ffi.py index d9519ae..33f1a30 100644 --- a/scripts/build_ffi.py +++ b/scripts/build_ffi.py @@ -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 diff --git a/tests/test_ciphers.py b/tests/test_ciphers.py index 2cbd483..16d8364 100644 --- a/tests/test_ciphers.py +++ b/tests/test_ciphers.py @@ -605,7 +605,7 @@ def test_ecc_sign_verify_raw(ecc_private, ecc_public): # 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. diff --git a/wolfcrypt/ciphers.py b/wolfcrypt/ciphers.py index 8fa304b..08d5062 100644 --- a/wolfcrypt/ciphers.py +++ b/wolfcrypt/ciphers.py @@ -183,7 +183,7 @@ def encrypt(self, string): 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)