Created
May 27, 2024 13:33
-
-
Save anmarco/cb8df481e2f72ab70d784c09cb862ae0 to your computer and use it in GitHub Desktop.
black on git diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
changed_files=$(git diff --name-only --diff-filter=d HEAD | grep '\.py$') | |
for file in $changed_files; do | |
isort "$file" | |
black "$file" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment