stackchain-dashboard/tests/test_repository_hygiene.py
timmy 9b912fc837
All checks were successful
CI / lint (pull_request) Successful in 8s
CI / build-frontend (pull_request) Successful in 5s
fix: stop tracking Python bytecode
2026-08-05 15:38:50 +00:00

19 lines
387 B
Python

import subprocess
def test_python_bytecode_is_not_tracked():
tracked = subprocess.run(
["git", "ls-files"],
check=True,
capture_output=True,
text=True,
).stdout.splitlines()
bytecode = [
path
for path in tracked
if "__pycache__" in path.split("/") or path.endswith((".pyc", ".pyo"))
]
assert bytecode == []