Skip to content

Commit 3ad717b

Browse files
committed
suppress what remains
1 parent 3218a64 commit 3ad717b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

ci/check-software-versions.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def process_tag(tag):
252252
if stop_and_remove_container(container_id) != 0:
253253
log.error(f"Failed to stop/remove the container '{container_id}' for the '{image_ref}' tag!")
254254
print_delimiter()
255-
return 1
255+
return 1 # noqa: B012 `return` inside `finally` blocks cause exceptions to be silenced
256256
print_delimiter()
257257

258258
return ret_code
@@ -295,7 +295,7 @@ def main():
295295
)
296296

297297
args = parser.parse_args()
298-
global prune_podman_data
298+
global prune_podman_data # noqa: PLW0603 Using the global statement to update `prune_podman_data` is discouraged
299299
prune_podman_data = args.prune_podman_data
300300

301301
ret_code = 0

ci/security-scan/quay_security_analysis.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def process_image(image, commit_id_path, release_version_n, hash_n):
111111
for feature in data["data"]["Layer"]["Features"]:
112112
if len(feature["Vulnerabilities"]) > 0:
113113
for vulnerability in feature["Vulnerabilities"]:
114-
vulnerabilities.append(vulnerability)
114+
vulnerabilities.append(vulnerability) # noqa: PERF402 Use `list` or `list.copy` to create a copy of a list
115115

116116
severity_levels = [entry.get("Severity", "Unknown") for entry in vulnerabilities]
117117
severity_counts = Counter(severity_levels)

tests/containers/conftest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def append[T](self, resource: T, cleanup_func: Callable[[T], None] | None = None
183183
184184
This is somewhat similar to Go's `defer`."""
185185
self.resources.append((resource, cleanup_func))
186-
return resource.__enter__() # ruff: noqa: PLC2801 Unnecessary dunder call to `__enter__`
186+
return resource.__enter__() # noqa: PLC2801 Unnecessary dunder call to `__enter__`
187187

188188
def destroy(self):
189189
"""Runs __exit__() on the registered resources as a cleanup."""

0 commit comments

Comments
 (0)