From 4a9ff1d76723d906f1fe38c13194e2c1f88248d8 Mon Sep 17 00:00:00 2001 From: "sentry-junior[bot]" <264270552+sentry-junior[bot]@users.noreply.github.com> Date: Mon, 2 Nov 2026 08:05:05 +0000 Subject: [PATCH] ref(toxgen): Remove unused get_file_hash and get_last_updated helpers --- scripts/populate_tox/populate_tox.py | 30 ---------------------------- 1 file changed, 30 deletions(-) diff --git a/scripts/populate_tox/populate_tox.py b/scripts/populate_tox/populate_tox.py index d70af722f3..f0b37b1c6b 100644 --- a/scripts/populate_tox/populate_tox.py +++ b/scripts/populate_tox/populate_tox.py @@ -1045,36 +1045,6 @@ def _transform_target_python_versions( return updated -def get_file_hash() -> str: - """Calculate a hash of the tox.ini file.""" - hasher = hashlib.md5() - - with open(TOX_FILE, "rb") as f: - buf = f.read() - hasher.update(buf) - - return hasher.hexdigest() - - -def get_last_updated() -> Optional[datetime]: - repo_root = subprocess.run( - ["git", "rev-parse", "--show-toplevel"], - capture_output=True, - text=True, - ).stdout.strip() - tox_ini_path = Path(repo_root) / "tox.ini" - - timestamp = subprocess.run( - ["git", "log", "-1", "--pretty=%ct", str(tox_ini_path)], - capture_output=True, - text=True, - ).stdout.strip() - - timestamp = datetime.fromtimestamp(int(timestamp), timezone.utc) - print(f"Last committed tox.ini update: {timestamp}") - return timestamp - - def _normalize_name(package: str) -> str: # From https://peps.python.org/pep-0503/#normalized-names # but normalizing to underscores instead of hyphens since tox-formatted packages