commit 2af4896a77b673867fb1de2ec8b87ab162597d1b parent 692d29eeae4d0ea704a9f33e4646622721be25d7 Author: Andrew D. Laack <andrew@laack.co> Date: Sat, 21 Feb 2026 06:20:20 +0000 Merge pull request #121 from yashdive/pre-commit-hook pre-commit hook added to automatically run black and isort before commits Diffstat:
| A | .pre-commit-config.yaml | | | 10 | ++++++++++ |
| M | DEVELOPMENT.md | | | 16 | ++++++++++++++++ |
2 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml @@ -0,0 +1,10 @@ +repos: + - repo: https://github.com/PyCQA/isort + rev: 7.0.0 + hooks: + - id: isort + - repo: https://github.com/psf/black + rev: 25.12.0 + hooks: + - id: black + args: [--line-length=120] diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md @@ -66,6 +66,22 @@ NOTE: Without passing `claude` into `build.sh` it will default to the image with Within the container, you can run `claude` to begin interactive authentication to get it setup. +## Formatting Hooks + +Install pre-commit hooks once per clone: + +```bash +uvx pre-commit install +``` + +Run formatting hooks manually across the repo: + +```bash +uvx pre-commit run --all-files +``` + +After installation, `isort` and `black` run automatically on staged Python files before each commit. + ## Running Tests ### Unit tests