-
Notifications
You must be signed in to change notification settings - Fork 37
/
.pre-commit-config.yaml
54 lines (53 loc) · 1.71 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
54
ci:
autofix_commit_msg: "[pre-commit.ci] auto fixes from pre-commit.com hooks"
autofix_prs: true
autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate"
autoupdate_schedule: weekly
submodules: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.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: end-of-file-fixer
- id: mixed-line-ending
- id: sort-simple-yaml
files: .pre-commit-config.yaml
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa # Enforce noqa annotations (noqa: F401,W203)
- id: python-use-type-annotations # Enforce type annotations instead of type comments
- repo: local
hooks:
- id: ruff
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-ruff
name: Ruff Formatter
description: Ruf ruff auto-formatter
entry: poetry run ruff format
language: system
types: [python]
require_serial: true
- repo: local
hooks:
- id: pyright
name: Pyright
description: Run pyright type checker
entry: poetry run pyright
language: system
types: [python]
pass_filenames: false # pyright runs for the entire project, it can't run for single files