Skip to content

Commit

Permalink
Pre-commit + blame ignore revs of black+isort setup
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonTagne committed Jul 15, 2022
1 parent ba63870 commit 585c459
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Black
d57c1831257a98b6ef1280c25c787598879074fb
# isort
ba63870c890c6b91862e35adb188b9c51dd75b0e
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repos:
- repo: local
hooks:
- id: black
name: black
entry: black
language: system
types: [python]
- id: isort
name: isort (python)
entry: isort
language: system
types: [python]
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,17 @@ Add something like this:
### Install initial data

`python manage.py loaddata polybookexchange_epfl.yaml`

## Contributing
The code is formatted using [black](https://github.com/psf/black) and [isort](https://github.com/pycqa/isort). You can install the tools with
```
pip install black isort
```

You can run the formating by running
```
$ black
$ isort
```

To run the formatters in the pre-commit hook, install pre-commit (`pip install pre-commit`) and run `$ pre-commit install` at the root of the repository

0 comments on commit 585c459

Please sign in to comment.