From b9b9026c531e0f6c6df02a1025cdabc48cfa0e99 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 10 Nov 2022 09:15:21 +0100 Subject: [PATCH] Pacify pylint Signed-off-by: Gilles Peskine --- scripts/mbedtls_dev/bignum_common.py | 5 +---- tests/scripts/generate_bignum_tests.py | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/mbedtls_dev/bignum_common.py b/scripts/mbedtls_dev/bignum_common.py index 1eb4ca7dfb..8b11bc283c 100644 --- a/scripts/mbedtls_dev/bignum_common.py +++ b/scripts/mbedtls_dev/bignum_common.py @@ -14,9 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import itertools -import typing - from abc import abstractmethod from typing import Iterator, List, Tuple, TypeVar @@ -42,7 +39,7 @@ def hex_to_int(val: str) -> int: This is a superset of what is accepted by mbedtls_test_read_mpi_core(). """ - if val == '' or val == '-': + if val in ['', '-']: return 0 return int(val, 16) diff --git a/tests/scripts/generate_bignum_tests.py b/tests/scripts/generate_bignum_tests.py index f1b24409ea..eee2f657ad 100755 --- a/tests/scripts/generate_bignum_tests.py +++ b/tests/scripts/generate_bignum_tests.py @@ -85,6 +85,7 @@ class BignumOperation(bignum_common.OperationCommon, BignumTarget, metaclass=ABC ] def description_suffix(self) -> str: + #pylint: disable=no-self-use # derived classes need self """Text to add at the end of the test case description.""" return ""