Spaces:
Sleeping
Sleeping
Create .pre-commit-config.yaml
Browse files- .pre-commit-config.yaml +53 -0
.pre-commit-config.yaml
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
ci:
|
| 2 |
+
autofix_prs: true
|
| 3 |
+
autoupdate_schedule: weekly
|
| 4 |
+
autofix_commit_msg: "fix(pre_commit): 🎨 auto format pre-commit hooks"
|
| 5 |
+
autoupdate_commit_msg: "chore(pre_commit): ⬆ pre_commit autoupdate"
|
| 6 |
+
|
| 7 |
+
repos:
|
| 8 |
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
| 9 |
+
rev: v4.5.0
|
| 10 |
+
hooks:
|
| 11 |
+
- id: end-of-file-fixer
|
| 12 |
+
- id: trailing-whitespace
|
| 13 |
+
exclude: test/.*\.py
|
| 14 |
+
- id: check-yaml
|
| 15 |
+
- id: check-docstring-first
|
| 16 |
+
- id: check-executables-have-shebangs
|
| 17 |
+
- id: check-toml
|
| 18 |
+
- id: check-case-conflict
|
| 19 |
+
- id: check-added-large-files
|
| 20 |
+
- id: detect-private-key
|
| 21 |
+
- id: forbid-new-submodules
|
| 22 |
+
- id: pretty-format-json
|
| 23 |
+
exclude: demo.ipynb
|
| 24 |
+
args: ['--autofix', '--no-sort-keys', '--indent=4']
|
| 25 |
+
- id: end-of-file-fixer
|
| 26 |
+
- id: mixed-line-ending
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
- repo: https://github.com/PyCQA/bandit
|
| 31 |
+
rev: '1.7.6'
|
| 32 |
+
hooks:
|
| 33 |
+
- id: bandit
|
| 34 |
+
args: ["-c", "pyproject.toml"]
|
| 35 |
+
additional_dependencies: ["bandit[toml]"]
|
| 36 |
+
|
| 37 |
+
- repo: https://github.com/pycqa/isort
|
| 38 |
+
rev: 5.13.0
|
| 39 |
+
hooks:
|
| 40 |
+
- id: isort
|
| 41 |
+
name: isort (python)
|
| 42 |
+
- id: isort
|
| 43 |
+
name: isort (pyi)
|
| 44 |
+
types: [pyi]
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
| 48 |
+
rev: v0.1.7
|
| 49 |
+
hooks:
|
| 50 |
+
- id: ruff
|
| 51 |
+
args: [--fix, --exit-non-zero-on-fix]
|
| 52 |
+
- id: ruff-format
|
| 53 |
+
types_or: [ python, pyi, jupyter ]
|