forked from florianfesti/boxes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
112 lines (102 loc) · 3.2 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
# 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: v4.5.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
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0 # Use the ref you want to point at
hooks:
- id: python-use-type-annotations
- id: python-no-eval
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
- id: pyupgrade
args: [ --py38-plus ]
- repo: https://github.com/PyCQA/autoflake
rev: v2.2.1
hooks:
- id: autoflake
args: [ --remove-all-unused-imports, --in-place, --ignore-pass-statements, ]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
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.6.1
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.0
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.9.0.6
hooks:
- id: shellcheck
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
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