-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.pre-commit-config.yaml
45 lines (39 loc) · 1.34 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Please see the notes for developers for more information about this project's
# policy in regards to the use of git hooks. For more information about the
# pre-commit framework, please see: https://pre-commit.com
#
# To get started with them is this project yourself, simply run: pre-commit
repos:
# Some minor quality of life things
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-merge-conflict
- id: check-yaml
exclude: archive/|tmp/
- id: check-added-large-files
- id: no-commit-to-branch
args: ['--branch', 'main'] # Commits to main only allowed VIA PR for this project
# Ensure that revisions for tools such as ruff, black, etc. can be
# managed by Poetry but synced here before commiting code
- repo: https://github.com/floatingpurr/sync_with_poetry
rev: 0.4.0
hooks:
- id: sync_with_poetry
args: ['--db','.pre-commit-db.json']
# Format code
- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black
# Lint code
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.243
hooks:
- id: ruff
# Make sure the Poetry project is properly maintained
- repo: https://github.com/python-poetry/poetry
rev: 1.3.2
hooks:
- id: poetry-check
- id: poetry-lock