2022-07-20 11:49:05 +08:00
|
|
|
repos:
|
|
|
|
|
- repo: /home/admin/pre-commit/flake8
|
2022-10-18 17:47:23 +08:00
|
|
|
rev: 4.0.0
|
2022-07-20 11:49:05 +08:00
|
|
|
hooks:
|
|
|
|
|
- id: flake8
|
2023-01-11 10:43:56 +08:00
|
|
|
exclude: |
|
|
|
|
|
(?x)^(
|
|
|
|
|
thirdparty/|
|
|
|
|
|
examples/|
|
2023-03-21 18:10:10 +08:00
|
|
|
modelscope/utils/ast_index_file.py|
|
|
|
|
|
modelscope/fileio/format/jsonplus.py
|
2023-01-11 10:43:56 +08:00
|
|
|
)$
|
2022-07-20 11:49:05 +08:00
|
|
|
- repo: /home/admin/pre-commit/isort
|
|
|
|
|
rev: 4.3.21
|
|
|
|
|
hooks:
|
|
|
|
|
- id: isort
|
2023-01-11 10:43:56 +08:00
|
|
|
exclude: |
|
|
|
|
|
(?x)^(
|
|
|
|
|
examples/|
|
2023-03-21 18:10:10 +08:00
|
|
|
modelscope/utils/ast_index_file.py|
|
|
|
|
|
modelscope/fileio/format/jsonplus.py
|
2023-01-11 10:43:56 +08:00
|
|
|
)$
|
2022-07-20 11:49:05 +08:00
|
|
|
- repo: /home/admin/pre-commit/mirrors-yapf
|
|
|
|
|
rev: v0.30.0
|
|
|
|
|
hooks:
|
|
|
|
|
- id: yapf
|
2023-01-11 10:43:56 +08:00
|
|
|
exclude: |
|
|
|
|
|
(?x)^(
|
|
|
|
|
thirdparty/|
|
|
|
|
|
examples/|
|
2023-03-21 18:10:10 +08:00
|
|
|
modelscope/utils/ast_index_file.py|
|
|
|
|
|
modelscope/fileio/format/jsonplus.py
|
2023-01-11 10:43:56 +08:00
|
|
|
)$
|
2022-07-20 11:49:05 +08:00
|
|
|
- repo: /home/admin/pre-commit/pre-commit-hooks
|
|
|
|
|
rev: v3.1.0
|
|
|
|
|
hooks:
|
|
|
|
|
- id: trailing-whitespace
|
2023-03-21 18:10:10 +08:00
|
|
|
exclude: thirdparty/|modelscope/fileio/format/jsonplus.py
|
2022-07-20 11:49:05 +08:00
|
|
|
- id: check-yaml
|
2023-03-21 18:10:10 +08:00
|
|
|
exclude: thirdparty/|modelscope/fileio/format/jsonplus.py
|
2022-07-20 11:49:05 +08:00
|
|
|
- id: end-of-file-fixer
|
|
|
|
|
exclude: thirdparty/
|
|
|
|
|
- id: requirements-txt-fixer
|
2023-03-21 18:10:10 +08:00
|
|
|
exclude: thirdparty/|modelscope/fileio/format/jsonplus.py
|
2022-07-20 11:49:05 +08:00
|
|
|
- id: double-quote-string-fixer
|
2023-03-21 18:10:10 +08:00
|
|
|
exclude: thirdparty/|modelscope/fileio/format/jsonplus.py
|
2022-07-20 11:49:05 +08:00
|
|
|
- id: check-merge-conflict
|
2023-03-21 18:10:10 +08:00
|
|
|
exclude: thirdparty/|modelscope/fileio/format/jsonplus.py
|
2022-07-20 11:49:05 +08:00
|
|
|
- id: fix-encoding-pragma
|
2023-03-21 18:10:10 +08:00
|
|
|
exclude: thirdparty/|modelscope/fileio/format/jsonplus.py
|
2022-07-20 11:49:05 +08:00
|
|
|
args: ["--remove"]
|
|
|
|
|
- id: mixed-line-ending
|
2023-03-21 18:10:10 +08:00
|
|
|
exclude: thirdparty/|modelscope/fileio/format/jsonplus.py
|
2022-07-20 11:49:05 +08:00
|
|
|
args: ["--fix=lf"]
|