Skip to content

Commit

Permalink
chore: fix pylint message redefined-variable-type
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Troeger <[email protected]>
  • Loading branch information
jenstroeger committed Oct 2, 2024
1 parent 94504d4 commit 2a69104
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ ignore_missing_imports = true
fail-under = 10.0
suggestion-mode = true # Remove this setting when pylint v4 is released.
load-plugins = [
"pylint.extensions.redefined_variable_type", # https://github.com/pylint-dev/pylint/issues/8955
]
disable = [
"fixme",
Expand All @@ -230,7 +231,6 @@ disable = [
"too-many-public-methods",
"too-many-return-statements",
"too-many-statements",
"too-many-try-statements",
"duplicate-code",
]

Expand Down
6 changes: 3 additions & 3 deletions src/macaron/slsa_analyzer/checks/build_as_code_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def run_check(self, ctx: AnalyzeContext) -> CheckResultData:
confidence=Confidence.HIGH,
)
)
overall_res = CheckResultType.PASSED
overall_res = CheckResultType.PASSED # pylint: disable=redefined-variable-type
try:
for build_command in ci_service.get_build_tool_commands(
callgraph=ci_info["callgraph"], build_tool=tool
Expand Down Expand Up @@ -263,7 +263,7 @@ def run_check(self, ctx: AnalyzeContext) -> CheckResultData:
confidence=confidence,
)
)
overall_res = CheckResultType.PASSED
overall_res = CheckResultType.PASSED # pylint: disable=redefined-variable-type
except CallGraphError as error:
logger.debug(error)

Expand Down Expand Up @@ -292,7 +292,7 @@ def run_check(self, ctx: AnalyzeContext) -> CheckResultData:
confidence=Confidence.LOW,
)
)
overall_res = CheckResultType.PASSED
overall_res = CheckResultType.PASSED # pylint: disable=redefined-variable-type

# The check passing is contingent on at least one passing, if
# one passes treat whole check as passing. We do still need to
Expand Down
4 changes: 2 additions & 2 deletions src/macaron/slsa_analyzer/checks/build_service_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def run_check(self, ctx: AnalyzeContext) -> CheckResultData:
confidence=confidence,
)
)
overall_res = CheckResultType.PASSED
overall_res = CheckResultType.PASSED # pylint: disable=redefined-variable-type
except CallGraphError as error:
logger.debug(error)

Expand Down Expand Up @@ -193,7 +193,7 @@ def run_check(self, ctx: AnalyzeContext) -> CheckResultData:
confidence=Confidence.LOW,
)
)
overall_res = CheckResultType.PASSED
overall_res = CheckResultType.PASSED # pylint: disable=redefined-variable-type

# The check passing is contingent on at least one passing, if
# one passes treat whole check as passing. We do still need to
Expand Down
3 changes: 1 addition & 2 deletions src/macaron/slsa_analyzer/checks/provenance_l3_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,7 @@ class Feedback(NamedTuple):
result_value = CheckResultType.FAILED
else:
result_tables.append(ProvenanceL3VerifiedFacts(confidence=Confidence.HIGH))
result_value = CheckResultType.PASSED
return CheckResultData(result_tables=result_tables, result_type=result_value)
return CheckResultData(result_tables=result_tables, result_type=CheckResultType.PASSED)

return CheckResultData(result_tables=result_tables, result_type=result_value)

Expand Down

0 comments on commit 2a69104

Please sign in to comment.