-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
102 lines (90 loc) · 2.85 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
---
default_language_version:
python: python3.12
# pyright requires internet connection to run, which the pre-commit ci app doesn't have.
# it instead runs in a github action
ci:
skip: [pyright]
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.4
hooks:
- id: ruff
args: [--fix]
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
args: [--preview]
- repo: https://github.com/PyCQA/autoflake
rev: v2.3.1
hooks:
- id: autoflake
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.0
hooks:
- id: pyupgrade
args: [--py39-plus]
exclude: tests/eval_files/async103.py
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
hooks:
- id: mypy
# uses py311 syntax, mypy configured for py39
exclude: tests/eval_files/.*_py311.py
- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.389
hooks:
- id: pyright
# ignore warnings about new version being available, no other warnings
# are suppressed by this.
entry: env PYRIGHT_PYTHON_IGNORE_WARNING=true pyright
# exit with non-zero on warnings
args: [--warnings]
# Required for pyright strict mode
# Mirrors content of requirements-typing.txt, as pre-commit does not allow
# reading from that for caching reasons.
additional_dependencies:
- anyio
- flake8
- GitPython
- hypothesis
- hypothesmith
- pytest
- trio
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
additional_dependencies:
- tomli
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: debug-statements
language_version: python3
- id: end-of-file-fixer
- id: fix-encoding-pragma
args: [--remove]
- id: trailing-whitespace
args: ['--markdown-linebreak-ext=md,markdown']
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.3
hooks:
- id: yamlfmt
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.14.0
hooks:
- id: pretty-format-toml
args: [--autofix]
- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: v1.0.0
hooks:
- id: sphinx-lint