forked from ing-bank/probatus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
59 lines (59 loc) · 1.89 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: check-case-conflict # Different OSes
name: 'Check case conflict: Naming of files is compatible with all OSes'
- id: check-docstring-first
name: 'Check docstring first: Ensures Docstring present and first'
- id: detect-private-key
name: 'Detect private key: Prevent commit of env related keys'
- id: trailing-whitespace
name: 'Trailing whitespace: Remove empty spaces'
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.7.0
hooks:
- id: nbqa-ruff
name: 'ruff nb: Check for errors, styling issues and complexity'
- id: nbqa-mypy
name: 'mypy nb: Static type checking'
- id: nbqa-isort
name: 'isort nb: Sort file imports'
- id: nbqa-pyupgrade
name: 'pyupgrade nb: Updates code to Python 3.8+ code convention'
args: [&py_version --py37-plus]
- id: nbqa-black
name: 'black nb: PEP8 compliant code formatter'
- repo: local
hooks:
- id: mypy
name: 'mypy: Static type checking'
entry: mypy
language: system
types: [python]
- repo: local
hooks:
- id: ruff-check
name: 'Ruff: Check for errors, styling issues and complexity, and fixes issues if possible (including import order)'
entry: ruff check
language: system
args: [ --fix, --no-cache ]
- id: ruff-format
name: 'Ruff: format code in line with PEP8'
entry: ruff format
language: system
args: [ --no-cache ]
- repo: local
hooks:
- id: codespell
name: 'codespell: Check for grammar'
entry: codespell
language: system
types: [python]
args: [-L mot] # Skip the word "mot"
- repo: https://github.com/asottile/pyupgrade
rev: v3.4.0
hooks:
- id: pyupgrade
name: 'pyupgrade: Updates code to Python 3.8+ code convention'
args: [*py_version]