1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-01-01 12:45:34 +00:00

Merge pull request #7477 from Michael-Girma/enhancement/issue-7476

Added pre-commit for linting purposes. Fixes #7476
This commit is contained in:
TW 2023-03-27 16:22:48 +02:00 committed by GitHub
commit 8dc52b23db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 0 deletions

10
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,10 @@
repos:
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
files: '(src|scripts|conftest.py)'

View file

@ -179,6 +179,13 @@ virtual env and run::
pip install -r requirements.d/development.txt
This project utilizes pre-commit to format and lint code before it is committed.
Although pre-commit is installed when running the command above, the pre-commit hooks
will have to be installed separately. Run this command to install the pre-commit hooks::
pre-commit install
Running the tests
-----------------

View file

@ -10,3 +10,4 @@ pytest-cov
pytest-benchmark
Cython
twine
pre-commit