Skip to content

Commit 35ebea7

Browse files
authored
feat: add pre commit hook (#220)
- add config yaml (copied from `unstructured` repo) - helps with dev's Quality of Life
1 parent 8c6d669 commit 35ebea7

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.pre-commit-config.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: "v4.3.0"
4+
hooks:
5+
- id: check-added-large-files
6+
- id: check-toml
7+
- id: check-yaml
8+
- id: check-json
9+
- id: check-xml
10+
- id: end-of-file-fixer
11+
exclude: \.json$
12+
include: \.py$
13+
- id: trailing-whitespace
14+
- id: mixed-line-ending
15+
16+
- repo: https://github.com/psf/black
17+
rev: 22.10.0
18+
hooks:
19+
- id: black
20+
args: ["--line-length=100"]
21+
language_version: python3
22+
23+
- repo: https://github.com/charliermarsh/ruff-pre-commit
24+
rev: "v0.0.230"
25+
hooks:
26+
- id: ruff
27+
args:
28+
[
29+
"--fix",
30+
"--select=I,UP015,UP032,UP034,UP018,COM,C4,PT,SIM,PLR0402",
31+
"--ignore=PT011,PT012,SIM117",
32+
]
33+
34+
- repo: https://github.com/pycqa/flake8
35+
rev: 4.0.1
36+
hooks:
37+
- id: flake8
38+
language_version: python3

0 commit comments

Comments
 (0)