-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
124 lines (121 loc) · 3.51 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
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: pytest
name: run pytest tests
entry: pytest -p no:warnings ./tests
language: system
pass_filenames: false
- id: update_requirements
name: update requirements.txt
entry: poetry export -f requirements.txt --output requirements.txt --with dev
language: system
pass_filenames: false
stages:
- pre-push
- repo: https://github.com/PyCQA/autoflake
rev: v2.2.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: v4.5.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/asottile/reorder-python-imports
rev: v3.12.0
hooks:
- id: reorder-python-imports
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.12.0
hooks:
- id: black
args: [ --line-length=120 ]
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
args: [ --max-line-length=120, --pytest-fixture-no-parentheses ]
language: system
types: [ python ]
pass_filenames: true
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.7.1
hooks:
- id: mypy
args: [ -p=ontouml_py ]
language: system
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.2
hooks:
- id: python-safety-dependencies-check
files: pyproject.toml
stages:
- pre-push
- repo: https://github.com/jendrikseipp/vulture
rev: v2.10
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: [ run_tests ]
submodules: false