Skip to content

Commit 98d1c65

Browse files
author
Michael Deyaso
committed
Installed and configured pre-commit to lint and format code. Fixes #7476
1 parent 276c5f3 commit 98d1c65

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

.pre-commit-config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
repos:
2+
- repo: https://github.com/psf/black
3+
rev: 22.10.0
4+
hooks:
5+
- id: black
6+
- repo: https://github.com/pycqa/flake8
7+
rev: 6.0.0
8+
hooks:
9+
- id: flake8
10+
files: '(src|scripts|conftest.py)'

docs/development.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,13 @@ virtual env and run::
179179
pip install -r requirements.d/development.txt
180180

181181

182+
This project utilizes pre-commit to format and lint code before it is committed.
183+
Although pre-commit is installed when running the command above, the pre-commit hooks
184+
will have to be installed separately. Run this command to install the pre-commit hooks::
185+
186+
pre-commit install
187+
188+
182189
Running the tests
183190
-----------------
184191

requirements.d/development.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ pytest-cov
1010
pytest-benchmark
1111
Cython
1212
twine
13+
pre-commit

0 commit comments

Comments
 (0)