-
Notifications
You must be signed in to change notification settings - Fork 4
/
.pre-commit-config.yaml
53 lines (49 loc) · 1.61 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
46
47
48
49
50
51
52
53
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-ast
name: Check if python files are valid syntax for the ast parser
- id: check-case-conflict
name: Check for case conflict on file names for case insensitive systems.
- id: check-merge-conflict
name: Check for merge conflict syntax.
- id: check-toml
name: Check TOML files for valid syntax.
- id: check-yaml
name: Check YAML files for valid syntax.
- id: debug-statements
name: Check for debug statements.
- id: end-of-file-fixer
name: Check for only one newline character at EOL.
- id: trailing-whitespace
name: Check for trailing whitespace.
args: [--markdown-linebreak-ext=md]
## The rest is entirely local as dependencies are synced through lockfile.
## This also makes it easier to keep pre-commit tool versions synced with
## poetry's versions.
- repo: local
hooks:
- id: black
name: black
entry: poetry run black
language: system
types: [python]
- id: pyright
name: pyright
entry: poetry run pyright
language: system
types: [python]
- id: ruff
name: ruff
entry: poetry run ruff check
language: system
types: [python]
args: [--fix, --exit-non-zero-on-fix]
exclude: "examples"
- id: slotscheck
name: slotscheck
entry: poetry run dev-symlink & poetry run slotscheck
language: system
types: [python]
exclude: "examples|scripts"