Spaces:
Runtime error
Runtime error
Johnny Lee
commited on
Commit
·
c974753
1
Parent(s):
24a33fc
add precommit
Browse files- .pre-commit-config.yaml +40 -0
.pre-commit-config.yaml
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
default_language_version:
|
2 |
+
node: system
|
3 |
+
python: python3.8
|
4 |
+
repos:
|
5 |
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
6 |
+
rev: v4.4.0
|
7 |
+
hooks:
|
8 |
+
- id: debug-statements
|
9 |
+
- id: end-of-file-fixer
|
10 |
+
exclude: "^.*.crt|^.*.json|^.*.svg|^.*.txt"
|
11 |
+
- id: requirements-txt-fixer
|
12 |
+
- id: trailing-whitespace
|
13 |
+
# - id: pretty-format-json
|
14 |
+
# args: [--autofix]
|
15 |
+
|
16 |
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
17 |
+
# Ruff version.
|
18 |
+
rev: v0.0.282
|
19 |
+
hooks:
|
20 |
+
- id: ruff
|
21 |
+
args: [--fix, --exit-non-zero-on-fix]
|
22 |
+
|
23 |
+
- repo: https://github.com/psf/black
|
24 |
+
rev: 23.7.0
|
25 |
+
# TODO: ensure that the black version is aligned, with another hook?
|
26 |
+
hooks:
|
27 |
+
- id: black
|
28 |
+
language: python
|
29 |
+
types: [python]
|
30 |
+
|
31 |
+
- repo: https://github.com/pycqa/isort
|
32 |
+
rev: 5.12.0
|
33 |
+
hooks:
|
34 |
+
- id: isort
|
35 |
+
name: isort
|
36 |
+
|
37 |
+
- repo: meta
|
38 |
+
hooks:
|
39 |
+
- id: check-useless-excludes
|
40 |
+
- id: check-hooks-apply
|