-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
83 lines (79 loc) · 2.21 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
# Various general + format-specific helpers
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-symlinks
- id: trailing-whitespace
- id: mixed-line-ending
args: [--fix=lf]
- id: check-yaml
exclude: 'mkdocs.yml'
- id: check-toml
- id: check-json
- id: check-ast
- id: debug-statements
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-added-large-files
args: [--maxkb=10000]
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: '0.22.0'
hooks:
- id: check-github-workflows
- repo: https://github.com/pycqa/isort
rev: '5.12.0'
hooks:
- id: isort
args: ['--profile', 'black']
- repo: https://github.com/ambv/black
rev: '23.1.0'
hooks:
- id: black
- repo: https://github.com/PyCQA/autoflake
rev: v2.1.1
hooks:
- id: autoflake
# Quality
- repo: https://github.com/pycqa/flake8
rev: '6.0.0'
hooks:
- id: flake8
additional_dependencies:
- Flake8-pyproject==1.2.3
- flake8-bugbear==23.3.23
- dlint==0.14.1
- repo: https://github.com/pycqa/pydocstyle
rev: '6.3.0'
hooks:
- id: pydocstyle
additional_dependencies: ["tomli==2.0.1"]
files: "^src/"
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.1.1'
hooks:
- id: mypy
args: [--no-strict-optional, --ignore-missing-imports]
# NOTE: you might need to add some deps here:
additional_dependencies: ["phantom-types>=1.1.0"]
- repo: https://github.com/PyCQA/bandit
rev: '1.7.5'
hooks:
- id: bandit
args: ['-q', '-c', 'pyproject.toml']
additional_dependencies: [ '.[toml]' ]
# Metadata
- repo: https://github.com/citation-file-format/cff-converter-python
rev: '44e8fc9'
hooks:
- id: validate-cff
- repo: https://github.com/fsfe/reuse-tool
rev: 'v1.1.2'
hooks:
- id: reuse
- repo: https://github.com/Materials-Data-Science-and-Informatics/somesy
rev: 'v0.1.0'
hooks:
- id: somesy