Skip to content

Commit

Permalink
[docs] Restructure "Set up pre-commit hooks" section in development.md (
Browse files Browse the repository at this point in the history
  • Loading branch information
bjacobgordon authored Mar 3, 2025
1 parent 32aff8c commit 91a6c15
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,30 @@
python -m pip install -r requirements.txt -r torchvision-requirements.txt
```

### Set up pre-commit hooks

### (Optional) Set up pre-commit
We recommend linting and formatting your commits _before_ the CI has a chance to complain about it.

This project uses [pre-commit](https://pre-commit.com/) in its CI. You can
install it locally too in order to lint and fix your code prior to the CI
complaining about it.
1. Install [pre-commit](https://pre-commit.com/)

```shell
pip install pre-commit
# You can run interactively with `pre-commit run`
# or install hooks so it runs automatically:
pre-commit install
```
```shell
pip install pre-commit
```

- This is the same package used by the CI.
1. Either:
- Run the hooks manually.

```shell
pre-commit run
```

OR
- Install them so they run automatically.

```shell
pre-commit install
```

## Building

Expand Down

0 comments on commit 91a6c15

Please sign in to comment.