Upload ms-swift/.pre-commit-config.yaml with huggingface_hub
Browse files
ms-swift/.pre-commit-config.yaml
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
repos:
|
| 2 |
+
- repo: https://github.com/pycqa/flake8.git
|
| 3 |
+
rev: 4.0.0
|
| 4 |
+
hooks:
|
| 5 |
+
- id: flake8
|
| 6 |
+
exclude: |
|
| 7 |
+
(?x)^(
|
| 8 |
+
thirdparty/|
|
| 9 |
+
examples/|
|
| 10 |
+
tests/run.py
|
| 11 |
+
)$
|
| 12 |
+
- repo: https://github.com/PyCQA/isort.git
|
| 13 |
+
rev: 4.3.21
|
| 14 |
+
hooks:
|
| 15 |
+
- id: isort
|
| 16 |
+
exclude: |
|
| 17 |
+
(?x)^(
|
| 18 |
+
examples/|
|
| 19 |
+
tests/run.py|
|
| 20 |
+
swift/cli/sft.py
|
| 21 |
+
)$
|
| 22 |
+
- repo: https://github.com/pre-commit/mirrors-yapf.git
|
| 23 |
+
rev: v0.30.0
|
| 24 |
+
hooks:
|
| 25 |
+
- id: yapf
|
| 26 |
+
exclude: |
|
| 27 |
+
(?x)^(
|
| 28 |
+
thirdparty/|
|
| 29 |
+
examples/|
|
| 30 |
+
tests/run.py
|
| 31 |
+
)$
|
| 32 |
+
- repo: https://github.com/pre-commit/pre-commit-hooks.git
|
| 33 |
+
rev: v3.1.0
|
| 34 |
+
hooks:
|
| 35 |
+
- id: trailing-whitespace
|
| 36 |
+
exclude: thirdparty/|tests/run.py
|
| 37 |
+
- id: check-yaml
|
| 38 |
+
exclude: thirdparty/|tests/run.py
|
| 39 |
+
- id: end-of-file-fixer
|
| 40 |
+
exclude: thirdparty/|tests/run.py
|
| 41 |
+
- id: requirements-txt-fixer
|
| 42 |
+
exclude: thirdparty/|tests/run.py
|
| 43 |
+
- id: double-quote-string-fixer
|
| 44 |
+
exclude: thirdparty/|tests/run.py
|
| 45 |
+
- id: check-merge-conflict
|
| 46 |
+
exclude: thirdparty/|tests/run.py
|
| 47 |
+
- id: fix-encoding-pragma
|
| 48 |
+
exclude: thirdparty/|tests/run.py
|
| 49 |
+
args: ["--remove"]
|
| 50 |
+
- id: mixed-line-ending
|
| 51 |
+
exclude: thirdparty/|tests/run.py
|
| 52 |
+
args: ["--fix=lf"]
|