Make pylint happy

Signed-off-by: Janos Follath <janos.follath@arm.com>
This commit is contained in:
Janos Follath 2022-11-09 16:04:41 +00:00
parent 3aeb60add6
commit 351e6885f5
2 changed files with 4 additions and 1 deletions

View File

@ -117,6 +117,7 @@ class BaseTest(metaclass=ABCMeta):
class BaseTarget: class BaseTarget:
#pylint: disable=too-few-public-methods
"""Base target for test case generation. """Base target for test case generation.
Child classes of this class represent an output file, and can be referred Child classes of this class represent an output file, and can be referred
@ -141,6 +142,7 @@ class BaseTarget:
will yield test cases from all classes derived from X. will yield test cases from all classes derived from X.
""" """
if issubclass(cls, BaseTest) and not inspect.isabstract(cls): if issubclass(cls, BaseTest) and not inspect.isabstract(cls):
#pylint: disable=no-member
yield from cls.generate_function_tests() yield from cls.generate_function_tests()
for subclass in sorted(cls.__subclasses__(), key=lambda c: c.__name__): for subclass in sorted(cls.__subclasses__(), key=lambda c: c.__name__):
yield from subclass.generate_tests() yield from subclass.generate_tests()

View File

@ -57,7 +57,7 @@ of BaseTarget in test_data_generation.py.
import sys import sys
from abc import ABCMeta from abc import ABCMeta
from typing import Iterator, List from typing import List
import scripts_path # pylint: disable=unused-import import scripts_path # pylint: disable=unused-import
from mbedtls_dev import test_case from mbedtls_dev import test_case
@ -69,6 +69,7 @@ from mbedtls_dev import bignum_common
from mbedtls_dev import bignum_core, bignum_mod_raw # pylint: disable=unused-import from mbedtls_dev import bignum_core, bignum_mod_raw # pylint: disable=unused-import
class BignumTarget(test_data_generation.BaseTarget): class BignumTarget(test_data_generation.BaseTarget):
#pylint: disable=too-few-public-methods
"""Target for bignum (legacy) test case generation.""" """Target for bignum (legacy) test case generation."""
target_basename = 'test_suite_bignum.generated' target_basename = 'test_suite_bignum.generated'