""" uv run https://gist.github.com/hugovk/d601e651e08d229714a86fb5b04bc6c9 """ import subprocess from pathlib import Path for directory in sorted(Path(".").iterdir(), key=lambda x: x.name.lower()): if directory.is_dir() and (directory / ".pre-commit-config.yaml").is_file(): print(directory) subprocess.run( ["prek", "install", "--allow-missing-config"], cwd=directory, check=True )