-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
132 lines (129 loc) · 4.19 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
exclude: ^(sphinx|doc)
repos:
- repo: local
hooks:
- id: pre_commit_autoupdate
name: pre-commit autoupdate
entry: pre-commit autoupdate
language: system
pass_filenames: false
stages:
- pre-push
- id: poetry-update
name: poetry update
entry: poetry update
language: system
pass_filenames: false
stages:
- pre-push
- id: update_requirements
name: update requirements.txt
entry: poetry export -f requirements.txt --output requirements.txt --with dev --extras langcodes
language: system
pass_filenames: false
stages:
- pre-push
- id: pytest
name: pytest ./tests
entry: pytest --disable-warnings --no-header --no-summary --cov=langstring --cov-report=html ./tests
language: system
pass_filenames: false
- repo: https://github.com/PyCQA/autoflake
rev: v2.3.1
hooks:
- id: autoflake
args: [ --in-place, --remove-all-unused-imports, --ignore-init-module-imports ]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-ast
- id: check-case-conflict
- id: check-merge-conflict
# - id: no-commit-to-branch # To be included when other contributions join the project
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.10.0
hooks:
- id: black
args: [ --line-length=120 ]
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8
# to identify additional_dependencies, run: flake8 --version
additional_dependencies: [flake8-pyproject,
flake8-pytest-style,
flake8-broken-line,
flake8-fixme,
flake8-implicit-str-concat,
flake8-noqa,
flake8-return,
flake8-unused-arguments,
flake8-useless-assert,
pep8-naming,
pydoclint,
pycodestyle,
pyflakes,
mccabe,
tryceratops]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.0
hooks:
- id: mypy
args: [ -p=langstring ]
language: python
types: [ python ]
pass_filenames: false
- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
name: pydocstyle
description: pydocstyle is a static analysis tool for checking compliance with Python docstring conventions.
entry: pydocstyle
language: python
types: [ python ]
- repo: https://github.com/Lucas-C/pre-commit-hooks-safety
rev: v1.3.3
hooks:
- id: python-safety-dependencies-check
files: pyproject.toml
stages:
- pre-push
- repo: https://github.com/jendrikseipp/vulture
rev: v2.14
hooks:
- id: vulture
- repo: local
hooks:
- id: update_documentation
name: update documentation
entry: python update_documentation.py
language: system
types: [ python ]
pass_filenames: false
stages:
- pre-push
- repo: https://gitlab.com/smop/pre-commit-hooks
rev: v1.0.0
hooks:
- id: check-poetry
name: Poetry check
description: Validates the structure of the pyproject.toml file
entry: poetry check
language: system
pass_filenames: false
files: pyproject.toml
stages:
- pre-push
ci:
autofix_commit_msg: |
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
autofix_prs: true
autoupdate_branch: ''
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
autoupdate_schedule: weekly
skip: [ pytest ] # pytest is not necessary as there is already a workflow for that
submodules: false