trygithubactions / check.py
subashpoudel's picture
Next commit
5f2769b
raw
history blame
312 Bytes
import os
import shutil
# Set the root directory, e.g., current directory
root_dir = "."
for dirpath, dirnames, filenames in os.walk(root_dir):
if "__pycache__" in dirnames:
cache_path = os.path.join(dirpath, "__pycache__")
shutil.rmtree(cache_path)
print(f"Deleted: {cache_path}")