Skip to content

Commit 56043ca

Browse files
authored
Merge pull request #322 from MerginMaps/fix/pre-commit-config
Fix/pre commit config
2 parents b2f05b7 + 65d0191 commit 56043ca

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Black version is kept in sync with .github/workflows/code_style.yml
2+
repos:
3+
- repo: https://github.com/psf/black-pre-commit-mirror
4+
rev: 26.1.0
5+
hooks:
6+
- id: black
7+
args: ["--line-length=120"]

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,3 +191,13 @@ For running test do:
191191
pip install pytest pytest-cov coveralls
192192
pytest --cov-report html --cov=mergin mergin/test/
193193
```
194+
195+
### Code style
196+
197+
Code is formatted with [black](https://github.com/psf/black) (line length 120), enforced in CI.
198+
To run the same check automatically before each commit, install the [pre-commit](https://pre-commit.com/) hooks once:
199+
200+
```bash
201+
pip install pre-commit
202+
pre-commit install
203+
```

0 commit comments

Comments
 (0)