File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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"]
Original file line number Diff line number Diff line change @@ -192,3 +192,15 @@ For running test do:
192192 pip install pytest pytest-cov coveralls
193193 pytest --cov-report html --cov=mergin mergin/test/
194194```
195+
196+ ### Code style
197+
198+ Code is formatted with [ black] ( https://github.com/psf/black ) (line length 120), enforced in CI.
199+ To run the same check automatically before each commit, install the [ pre-commit] ( https://pre-commit.com/ ) hooks once:
200+
201+ ``` bash
202+ pip install pre-commit
203+ pre-commit install
204+ ```
205+
206+ The hook then runs on every ` git commit ` .
You can’t perform that action at this time.
0 commit comments