ast-grep pre-commit hook that uses the PyPI distribution for seamless integration with Python projects.
Add this to your .pre-commit-config.yaml:
- repo: https://github.com/PFCCLab/ast-grep-pre-commit-mirror
rev: v0.39.9
hooks:
- id: ast-grep- id: ast-grep
args: ["--update-all"]- id: ast-grep
args: ["--config", "ast-grep/sgconfig.yml"]ast-grep uses AST pattern matching to search and rewrite code:
- Documentation - Learn the fundamentals
- Playground - Test patterns interactively
- Rule Examples - Browse community rules