Checks or formats Python files according to some arbitrary blank line formatting rules that are not possible with ruff.
# Show diff without modifying the file
uvx --from git+https://github.com/adamghill/woof woof format file.py --diff
# Format a file in place
uvx --from git+https://github.com/adamghill/woof woof format file.py
# Recursively format all Python files in the current directory
find . -name "*.py" | xargs -I{} uvx --from git+https://github.com/adamghill/woof woof format {}
# Check if a file is already formatted (non-zero exit if not)
uvx --from git+https://github.com/adamghill/woof woof check file.py
# Recursively check all Python files in the current directory
find . -name "*.py" | xargs -I{} uvx --from git+https://github.com/adamghill/woof woof check {}- Docstrings — adds a blank line after function docstrings
- Return/Yield — adds a blank line before
returnandyieldstatements - Block statements — adds a blank line before
if,for,while,with,try, andmatchblocks (when not the first statement in a function)
MIT