-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.pre-commit-config.yaml
139 lines (130 loc) · 3.74 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
repos:
# Pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: forbid-new-submodules
- id: fix-encoding-pragma
args: [--remove]
- id: end-of-file-fixer
- id: trailing-whitespace
- id: debug-statements
- id: detect-private-key
- id: check-builtin-literals
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
# Codespell
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
description: Checks for common misspellings.
types_or: [python, rst, markdown]
- repo: https://github.com/asottile/add-trailing-comma
rev: v3.1.0
hooks:
- id: add-trailing-comma
name: add-trailing-comma
types: [python]
# Black
- repo: https://github.com/psf/black
rev: 23.10.1
hooks:
- id: black
args: [
--line-length=100,
]
# Isort
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: [
--combine-as,
--line-length=100,
--ensure-newline-before-comments,
--force-single-line-imports,
--single-line-exclusions=typing,
--trailing-comma,
--multi-line=3,
--lines-after-imports=2,
--use-parentheses,
]
# Flake8
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
name: flake8
additional_dependencies:
- flake8-2020
- flake8-bandit
- flake8-bugbear
- flake8-coding
- flake8-comprehensions
- flake8-debugger
- flake8-deprecated
# - flake8-docstrings
- flake8-pep3101
- flake8-string-format
# - flake8-rst-docstrings
# - flake8-typing-imports
# - pep8-naming
types: [python]
args: [
--max-complexity=10,
--max-line-length=150,
--statistics,
--ignore=C101 RST210 S101 W503,
--per-file-ignores=
tests/*.py:D103
oups/__init__.py:F401
oups/store/__init__.py:F401
oups/store/writer.py:C901 S403 S301
oups/aggstream/__init__.py:F401
oups/aggstream/jcumsegagg.py:C901
oups/aggstream/segmentby.py:C901
oups/aggstream/cumsegagg.py:C901 E203
oups/aggstream/aggstream.py:C901
]
# Pydocstyle
- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
files: ^oups/
additional_dependencies:
- toml
args: [
"--ignore=D200,D203,D212,D417",
]
- repo: https://github.com/PyCQA/docformatter
rev: v1.7.5
hooks:
- id: docformatter
additional_dependencies: [tomli]
args: [
"--black",
"--make-summary-multi-line",
"--pre-summary-newline",
"--blank",
"--recursive",
"--in-place",
]
- repo: https://github.com/asottile/add-trailing-comma
rev: v3.1.0
hooks:
- id: add-trailing-comma
name: add-trailing-comma
types: [python]
# flake8 ignore justifications
# ----------------------------
# C901: Function is too complex
# D103: Missing docstring in public function
# RST210: Inline strong start-string without end-string (when describing **kwargs parameter)
# S101: Use of assert detected (use of assert normal for pytest)
# W503: Line break before binary operator
# S403 & S301: Use of pickle to serialize / unserialize data.