WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
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