From 0b641386f5d2b4fb1191210176534e2a7ab20c44 Mon Sep 17 00:00:00 2001 From: Alec Delaney <89490472+tekktrik@users.noreply.github.com> Date: Mon, 7 Nov 2022 21:21:14 -0500 Subject: [PATCH] Fix pylint errors --- adafruit_rsa/key.py | 2 -- adafruit_rsa/pkcs1.py | 1 - examples/rsa_tests.py | 5 ++--- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/adafruit_rsa/key.py b/adafruit_rsa/key.py index 82cca4e..3cc96aa 100755 --- a/adafruit_rsa/key.py +++ b/adafruit_rsa/key.py @@ -58,8 +58,6 @@ class AbstractKey(object): """Abstract superclass for private and public keys.""" - __slots__ = ("n", "e") - def __init__(self, n: int, e: int) -> None: self.n = n self.e = e diff --git a/adafruit_rsa/pkcs1.py b/adafruit_rsa/pkcs1.py index cede691..508bd25 100755 --- a/adafruit_rsa/pkcs1.py +++ b/adafruit_rsa/pkcs1.py @@ -44,7 +44,6 @@ class _FileLikeObject(Protocol): def read(self, blocksize: int) -> Union[bytes, str]: """A method that reads a given number of bytes or chracters""" - ... except ImportError: pass diff --git a/examples/rsa_tests.py b/examples/rsa_tests.py index 177b7e9..49345af 100755 --- a/examples/rsa_tests.py +++ b/examples/rsa_tests.py @@ -93,11 +93,10 @@ def test_sign_verify_fail(): # Run adafruit_rsa tests start_time = time.monotonic() -# pylint: disable=consider-using-enumerate -for test_num, test_name in enumerate(all_tests, start=0): +for test_name in all_tests: # for i in range(0, len(all_tests)): print("Testing: {}".format(test_name)) - all_tests[test_num]() + test_name() print("OK!") print( "Ran {} tests in {} seconds".format(len(all_tests), time.monotonic() - start_time)