Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions scripts/cleanup_temp_files.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
"""
Small helper to remove common temporary files created while experimenting
with the Kalshi starter code.

This script is intentionally conservative and only targets a few known
paths. Adjust it for your own workflow as needed.
"""

from __future__ import annotations

import shutil
from pathlib import Path


def main() -> None:
root = Path(__file__).resolve().parents[1]

candidates = [
root / ".pytest_cache",
root / ".mypy_cache",
root / "__pycache__",
]

removed_any = False

for path in candidates:
if path.exists():
print(f"Removing {path} ...")
shutil.rmtree(path)
removed_any = True

if not removed_any:
print("No known temporary directories found.")
else:
print("Cleanup finished.")


if __name__ == "__main__":
main()