Skip to content

Commit 2a69104

Browse files
committed
chore: fix pylint message redefined-variable-type
Signed-off-by: Jens Troeger <[email protected]>
1 parent 94504d4 commit 2a69104

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ ignore_missing_imports = true
212212
fail-under = 10.0
213213
suggestion-mode = true # Remove this setting when pylint v4 is released.
214214
load-plugins = [
215+
"pylint.extensions.redefined_variable_type", # https://github.com/pylint-dev/pylint/issues/8955
215216
]
216217
disable = [
217218
"fixme",
@@ -230,7 +231,6 @@ disable = [
230231
"too-many-public-methods",
231232
"too-many-return-statements",
232233
"too-many-statements",
233-
"too-many-try-statements",
234234
"duplicate-code",
235235
]
236236

src/macaron/slsa_analyzer/checks/build_as_code_check.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def run_check(self, ctx: AnalyzeContext) -> CheckResultData:
202202
confidence=Confidence.HIGH,
203203
)
204204
)
205-
overall_res = CheckResultType.PASSED
205+
overall_res = CheckResultType.PASSED # pylint: disable=redefined-variable-type
206206
try:
207207
for build_command in ci_service.get_build_tool_commands(
208208
callgraph=ci_info["callgraph"], build_tool=tool
@@ -263,7 +263,7 @@ def run_check(self, ctx: AnalyzeContext) -> CheckResultData:
263263
confidence=confidence,
264264
)
265265
)
266-
overall_res = CheckResultType.PASSED
266+
overall_res = CheckResultType.PASSED # pylint: disable=redefined-variable-type
267267
except CallGraphError as error:
268268
logger.debug(error)
269269

@@ -292,7 +292,7 @@ def run_check(self, ctx: AnalyzeContext) -> CheckResultData:
292292
confidence=Confidence.LOW,
293293
)
294294
)
295-
overall_res = CheckResultType.PASSED
295+
overall_res = CheckResultType.PASSED # pylint: disable=redefined-variable-type
296296

297297
# The check passing is contingent on at least one passing, if
298298
# one passes treat whole check as passing. We do still need to

src/macaron/slsa_analyzer/checks/build_service_check.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def run_check(self, ctx: AnalyzeContext) -> CheckResultData:
164164
confidence=confidence,
165165
)
166166
)
167-
overall_res = CheckResultType.PASSED
167+
overall_res = CheckResultType.PASSED # pylint: disable=redefined-variable-type
168168
except CallGraphError as error:
169169
logger.debug(error)
170170

@@ -193,7 +193,7 @@ def run_check(self, ctx: AnalyzeContext) -> CheckResultData:
193193
confidence=Confidence.LOW,
194194
)
195195
)
196-
overall_res = CheckResultType.PASSED
196+
overall_res = CheckResultType.PASSED # pylint: disable=redefined-variable-type
197197

198198
# The check passing is contingent on at least one passing, if
199199
# one passes treat whole check as passing. We do still need to

src/macaron/slsa_analyzer/checks/provenance_l3_check.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -451,8 +451,7 @@ class Feedback(NamedTuple):
451451
result_value = CheckResultType.FAILED
452452
else:
453453
result_tables.append(ProvenanceL3VerifiedFacts(confidence=Confidence.HIGH))
454-
result_value = CheckResultType.PASSED
455-
return CheckResultData(result_tables=result_tables, result_type=result_value)
454+
return CheckResultData(result_tables=result_tables, result_type=CheckResultType.PASSED)
456455

457456
return CheckResultData(result_tables=result_tables, result_type=result_value)
458457

0 commit comments

Comments
 (0)