fix: resolve ruff lint errors (unused imports and variable)
CI/CD / lint-test (push) Failing after 34s
CI/CD / build-push (push) Has been skipped

This commit is contained in:
claude-code
2026-06-30 11:40:11 +00:00
parent 528da1e167
commit cb7a2abf17
+2 -4
View File
@@ -1,3 +1,4 @@
import re
#!/usr/bin/env python3
"""
k8s-version-tracker: Weekly Kubernetes image version checker and Mattermost notifier.
@@ -8,8 +9,6 @@ notification with the weekly report.
"""
import os
import re
import json
import logging
import subprocess
from dataclasses import dataclass, field
@@ -17,7 +16,7 @@ from typing import Optional
from datetime import datetime, timezone
import requests
from kubernetes import client, config
from kubernetes import config
from packaging.version import Version, InvalidVersion
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s")
@@ -121,7 +120,6 @@ def parse_image_ref(image: str) -> ImageInfo:
def _semver_tags(tags: list[str], current_tag: str) -> Optional[str]:
"""From a list of tags, return the latest stable semver tag comparable to current."""
norm = current_tag.lstrip("v")
has_v_prefix = current_tag.startswith("v")
# Detect suffix pattern (e.g. '-alpine', '-amd64')
suffix_match = re.search(r"(-[a-zA-Z][a-zA-Z0-9._-]*)$", norm)