-
Notifications
You must be signed in to change notification settings - Fork 369
/
.pre-commit-config.yaml
115 lines (105 loc) · 3.28 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
112
113
114
115
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
ci:
autofix_prs: true
autoupdate_schedule: quarterly
exclude: '\.svg$'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-added-large-files
- id: requirements-txt-fixer
- id: check-case-conflict
- id: detect-private-key
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: check-illegal-windows-names
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-no-eval
- id: python-no-log-warn
- id: python-use-type-annotations
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
- id: text-unicode-replacement-char
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.0
hooks:
- id: pyupgrade
args: [ --py39-plus ]
- repo: https://github.com/PyCQA/autoflake
rev: v2.3.1
hooks:
- id: autoflake
args: [ --remove-all-unused-imports, --in-place, --ignore-pass-statements, ]
# - repo: https://github.com/pycqa/isort
# rev: 5.13.2
# hooks:
# - id: isort
# A lot todo to pass test.
#- repo: https://github.com/PyCQA/flake8
# rev: 6.1.0
# hooks:
# - id: flake8
# additional_dependencies: [ flake8-bugbear ]
# args: [ '--extend-ignore=E402,E501,E201,E202,E203,E221,E225,E231,E261,E266,E302,E305' ]
# # additional_dependencies: [ flake8-bugbear, flake8-docstrings ]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
hooks:
- id: mypy
args: [ '--ignore-missing-imports' ]
files: '^boxes/.*\.py$'
- id: mypy
args: [ '--ignore-missing-imports' ]
files: '^documentation/src/boxes2rst.py$'
- id: mypy
args: [ '--ignore-missing-imports' ]
files: '^scripts/boxes$'
- id: mypy
args: [ '--ignore-missing-imports' ]
files: '^scripts/boxes2inkscape$'
- id: mypy
args: [ '--ignore-missing-imports' ]
files: '^scripts/boxes2pot$'
- id: mypy
args: [ '--ignore-missing-imports' ]
files: '^scripts/boxes_proxy.py$'
- id: mypy
args: [ '--ignore-missing-imports' ]
additional_dependencies: [ 'types-Markdown' ]
files: '^scripts/boxesserver$'
- id: mypy
args: [ '--ignore-missing-imports' ]
files: '^setup.py$'
- repo: https://github.com/rstcheck/rstcheck
rev: v6.2.4
hooks:
- id: rstcheck
args: [ "--report-level=warning", "--ignore-directives=autoclass,automethod,automodule" ]
additional_dependencies: [ sphinx ]
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
exclude: ^(boxes|locale|po|static)/ # todo folder boxes
- repo: local
hooks:
- id: pytest
name: pytest
entry: pytest
language: system
types: [ python ]
pass_filenames: false
always_run: true