Skip to content

pre-commit hook for yapf #18

@bw4sz

Description

@bw4sz

I think we can automate the pre-commit hook for yapf better. From co-pilot

#!/bin/bash
# Format all tracked Python files
files=$(git diff --cached --name-only --diff-filter=ACM | grep '\.py$')

if [ -n "$files" ]; then
    echo "Running yapf on Python files..."
    yapf -i $files
    git add $files
fi

and place into

chmod +x .git/hooks/pre-commit

do we already have this for deepforest?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions