forked from jendrikseipp/rednotebook
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
49 lines (44 loc) · 1.35 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: check-yaml
- id: check-added-large-files
# Static analysis for Python code
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
# E203: whitespace before ':' (not compliant with PEP 8)
# E402: module level import not at top of file
# F821: undefined name "_"
args: ['--extend-ignore=E203,E402,F821', '--max-line-length=110', '--builtins="_"']
exclude: ^rednotebook/external/
# Python code formatter
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
exclude: ^rednotebook/external/
# Imports sorter
- repo: https://github.com/pycqa/isort
rev: 5.11.5
hooks:
- id: isort
exclude: ^rednotebook/journal.py
# Upgrades Python code to a target version
- repo: https://github.com/asottile/pyupgrade
rev: v3.4.0
hooks:
- id: pyupgrade
args: ['--py36-plus', '--exit-zero']
exclude: ^rednotebook/external/
# Finds unused Python code
- repo: https://github.com/jendrikseipp/vulture
rev: v2.7
hooks:
- id: vulture
exclude: ^rednotebook/external/