forked from ostr00000/freecad-stubs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
111 lines (95 loc) · 2.6 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
103
104
105
106
107
108
109
110
111
default_language_version:
python: python3.12
files: | # python regex
(?x) # verbose regex
^(?: # start of filename
lib/.* # all working python
|
[^/]+ # top level files
)$ # end of filename
repos:
- repo: meta
hooks:
- id: identity
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-merge-conflict
- id: check-case-conflict
- id: check-yaml
- id: check-toml
- id: check-ast
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.15
hooks:
- id: validate-pyproject
- repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
hooks:
- id: toml-sort-fix
- repo: https://github.com/crate-ci/typos
rev: v1.16.21
hooks:
- id: typos
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies: [ tomli ]
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.17
hooks:
- id: mdformat
additional_dependencies:
- mdformat-gfm
- mdformat-black
args: [ --number ]
- repo: https://github.com/MarcoGorelli/auto-walrus
rev: v0.2.2
hooks:
- id: auto-walrus
args: [ --line-length=89 ]
- repo: https://github.com/psf/black
rev: 23.10.1
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.3
hooks:
- id: ruff
name: ruff-diff
args: [ --exit-non-zero-on-fix, --diff ]
- id: ruff
name: ruff-show-fixes
args: [ --exit-non-zero-on-fix, --show-fixes ]
- id: ruff
name: ruff-auto-fix
args: [ --exit-non-zero-on-fix, --fix ]
- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.335
hooks:
- id: pyright
# - repo: local
# hooks:
# - id: mypy-local
# name: Mypy local
# description:
# Install current package in editable mode and then run mypy.
# The installation is required, because mypy is unable to use stub only
# packages pointed by `mypy_path`.
# entry: bash -c 'pip install --editable . >/dev/null && mypy'
# language: python
# types: [ python ]
# pass_filenames: false
# additional_dependencies:
# - mypy==1.6.1
# - PyQt5
# - more-itertools
# - qtpy
# args:
# - --strict