Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Black version is kept in sync with .github/workflows/code_style.yml
repos:
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 26.1.0
hooks:
- id: black
args: ["--line-length=120"]
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,15 @@ For running test do:
pip install pytest pytest-cov coveralls
pytest --cov-report html --cov=mergin mergin/test/
```

### Code style

Code is formatted with [black](https://github.com/psf/black) (line length 120), enforced in CI.
To run the same check automatically before each commit, install the [pre-commit](https://pre-commit.com/) hooks once:

```bash
pip install pre-commit
pre-commit install
```

The hook then runs on every `git commit`.
Loading