From 6fb8d2e53d6f12cddfcac0b815f9bf25dd6138cc Mon Sep 17 00:00:00 2001 From: Simeon Ehrig Date: Mon, 12 Feb 2024 16:59:31 +0100 Subject: [PATCH] fix pylint issues --- bashi/filter_backend.py | 6 ++++-- bashi/filter_compiler_version.py | 7 +++++-- bashi/filter_software_dependency.py | 6 ++++-- bashi/validate.py | 10 +++++----- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/bashi/filter_backend.py b/bashi/filter_backend.py index bec39bf..f76bc1a 100644 --- a/bashi/filter_backend.py +++ b/bashi/filter_backend.py @@ -32,9 +32,11 @@ def backend_filter_typechecked( return backend_filter(row, output) +# TODO(SimeonEhrig): remove disable=unused-argument +# only required for the CI at the moment def backend_filter( - row: ParameterValueTuple, - output: Optional[IO[str]] = None, + row: ParameterValueTuple, # pylint: disable=unused-argument + output: Optional[IO[str]] = None, # pylint: disable=unused-argument ) -> bool: """Filter rules basing on backend names and versions. diff --git a/bashi/filter_compiler_version.py b/bashi/filter_compiler_version.py index a27ac11..8e3a314 100644 --- a/bashi/filter_compiler_version.py +++ b/bashi/filter_compiler_version.py @@ -32,9 +32,11 @@ def compiler_version_filter_typechecked( return compiler_version_filter(row, output) +# TODO(SimeonEhrig): remove disable=unused-argument +# only required for the CI at the moment def compiler_version_filter( - row: ParameterValueTuple, - output: Optional[IO[str]] = None, + row: ParameterValueTuple, # pylint: disable=unused-argument + output: Optional[IO[str]] = None, # pylint: disable=unused-argument ) -> bool: """Filter rules basing on host and device compiler names and versions. @@ -47,4 +49,5 @@ def compiler_version_filter( Returns: bool: True, if parameter-value-tuple is valid. """ + return True diff --git a/bashi/filter_software_dependency.py b/bashi/filter_software_dependency.py index 800b79d..4314402 100644 --- a/bashi/filter_software_dependency.py +++ b/bashi/filter_software_dependency.py @@ -32,9 +32,11 @@ def software_dependency_filter_typechecked( return software_dependency_filter(row, output) +# TODO(SimeonEhrig): remove disable=unused-argument +# only required for the CI at the moment def software_dependency_filter( - row: ParameterValueTuple, - output: Optional[IO[str]] = None, + row: ParameterValueTuple, # pylint: disable=unused-argument + output: Optional[IO[str]] = None, # pylint: disable=unused-argument ) -> bool: """Filter rules handling software dependencies and compiler settings. diff --git a/bashi/validate.py b/bashi/validate.py index b08e8ab..8387cc9 100644 --- a/bashi/validate.py +++ b/bashi/validate.py @@ -224,11 +224,11 @@ def check_single_filter( if filter_func(row, msg): print(cs(f"{filter_name}() returns True", "Green")) return True - else: - print(cs(f"{filter_name}() returns False", "Red")) - if msg.getvalue() != "": - print(" " + msg.getvalue()) - return False + + print(cs(f"{filter_name}() returns False", "Red")) + if msg.getvalue() != "": + print(" " + msg.getvalue()) + return False @typechecked