Skip to content

Instantly share code, notes, and snippets.

@malted
Last active July 14, 2021 14:45
Show Gist options
  • Save malted/8d7a3b1d23ffd1e595810a16d1e638ed to your computer and use it in GitHub Desktop.
Save malted/8d7a3b1d23ffd1e595810a16d1e638ed to your computer and use it in GitHub Desktop.
A utility script to format python files in a project and remove __pycache__ directories and their contents
find ./src/ -name "*.py" | xargs black
find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment