File tree Expand file tree Collapse file tree 1 file changed +21
-10
lines changed Expand file tree Collapse file tree 1 file changed +21
-10
lines changed Original file line number Diff line number Diff line change 47
47
python -m pip install -r requirements.txt -r torchvision-requirements.txt
48
48
` ` `
49
49
50
+ # ## Set up pre-commit hooks
50
51
51
- # ## (Optional) Set up pre-commit
52
+ We recommend linting and formatting your commits _before_ the CI has a chance to complain about it.
52
53
53
- This project uses [pre-commit](https://pre-commit.com/) in its CI. You can
54
- install it locally too in order to lint and fix your code prior to the CI
55
- complaining about it.
54
+ 1. Install [pre-commit](https://pre-commit.com/)
56
55
57
- ` ` ` shell
58
- pip install pre-commit
59
- # You can run interactively with `pre-commit run`
60
- # or install hooks so it runs automatically:
61
- pre-commit install
62
- ` ` `
56
+ ` ` ` shell
57
+ pip install pre-commit
58
+ ` ` `
59
+
60
+ - This is the same package used by the CI.
61
+ 1. Either:
62
+ - Run the hooks manually.
63
+
64
+ ` ` ` shell
65
+ pre-commit run
66
+ ` ` `
67
+
68
+ OR
69
+ - Install them so they run automatically.
70
+
71
+ ` ` ` shell
72
+ pre-commit install
73
+ ` ` `
63
74
64
75
# # Building
65
76
You can’t perform that action at this time.
0 commit comments