-
Notifications
You must be signed in to change notification settings - Fork 3
/
.pre-commit-config.yaml
53 lines (49 loc) · 1.57 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.3.0
hooks:
- id: check-merge-conflict
- id: check-toml # For pyproject.toml
- id: check-yaml # For workflows
- id: end-of-file-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: mixed-line-ending
args: [--fix=lf]
- repo: local
hooks:
- id: ruff-linter
name: Ruff Linter
description: Run ruff checks on the code
entry: poetry run ruff check --force-exclude
language: system
types: [python]
require_serial: true
args: [--fix, --exit-non-zero-on-fix]
- repo: local
hooks:
- id: ruff-formatter
name: Ruff Formatter
description: Ruf ruff auto-formatter
entry: poetry run ruff format
language: system
types: [python]
require_serial: true
- repo: local
hooks:
- id: slotscheck
name: Slotscheck
description: "Slotscheck: Ensure your __slots__ are working properly"
entry: poetry run slotscheck -m mcproto
language: system
pass_filenames: false # running slotscheck for single files doesn't respect ignored files, run for entire project
types: [python]
- repo: local
hooks:
- id: basedpyright
name: Based Pyright
description: Run basedpyright type checker
entry: poetry run basedpyright
language: system
types: [python]
pass_filenames: false # pyright runs for the entire project, it can't run for single files