Skip to content

Commit

Permalink
fix pylint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
SimeonEhrig committed Feb 12, 2024
1 parent 2cfb8c5 commit 6fb8d2e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
6 changes: 4 additions & 2 deletions bashi/filter_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 5 additions & 2 deletions bashi/filter_compiler_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -47,4 +49,5 @@ def compiler_version_filter(
Returns:
bool: True, if parameter-value-tuple is valid.
"""

return True
6 changes: 4 additions & 2 deletions bashi/filter_software_dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 5 additions & 5 deletions bashi/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6fb8d2e

Please sign in to comment.