-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy path.pre-commit-config.yaml
96 lines (83 loc) · 2.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
# Pre-commit hooks for repo.
# Packages:
# pre-commit: General pre-commits for formatting.
# black: Python code strict formatting.
# pyupgrade: Upgrade syntax for newer versions of the language.
# isort: Sorts imports.
# flake8: Checks code follows PEP8 standard.
# mypy: Static typing.
# conventional-pre-commit: commit format checker.
# blacken-docs: Checks docs follow black format standard.
# pydocstyle: Checking docstring style.
# codespell: Checks for common misspellings.
default_stages: ["commit", "commit-msg", "push"]
default_language_version:
python: python3.10
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude_types: [image]
- id: check-merge-conflict
- id: debug-statements
- id: mixed-line-ending
- id: check-yaml
- repo: https://github.com/psf/black
rev: 23.11.0
hooks:
- id: black
exclude_types: [image]
language_version: python3
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
- id: pyupgrade
- repo: https://github.com/timothycrosley/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
args:
[
"--max-line-length=100",
"--extend-ignore=E203,BLK100",
"--exclude=*tests*",
]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.7.0
hooks:
- id: mypy
exclude: ^docs/|test
args: [--config-file=setup.cfg]
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.0.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
- repo: https://github.com/asottile/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies: [black>=22.1.0]
language_version: python3
- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
name: Checking docstring style.
args: ["--convention=google", "--match=^((?!test).)*$"]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
name: codespell
description: Checks for common misspellings in text files.
args: ["--skip=*.json,*.csv", "--ignore-words=.codespell-ignore.txt"]
language: python
types: [text]