-
Notifications
You must be signed in to change notification settings - Fork 24
/
.pre-commit-config.yaml
59 lines (59 loc) · 1.96 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.8.5
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.9+ code convention'
args: [&py_version --py38-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 missings,bu'] # Skip the word "missings" and "bu"
- repo: https://github.com/asottile/pyupgrade
rev: v3.16.0
hooks:
- id: pyupgrade
name: "pyupgrade: Updates code to Python 3.9+ code convention"
args: [*py_version]