2024-09-29 19:13:50 +08:00
|
|
|
exclude: 'modelscope/preprocessors/templates/'
|
|
|
|
|
|
2022-05-12 16:05:23 +08:00
|
|
|
repos:
|
2022-11-17 21:02:14 +08:00
|
|
|
- repo: https://github.com/pycqa/flake8.git
|
2022-10-18 17:47:23 +08:00
|
|
|
rev: 4.0.0
|
2022-05-12 16:05:23 +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: https://github.com/PyCQA/isort.git
|
2022-05-12 16:05:23 +08:00
|
|
|
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: https://github.com/pre-commit/mirrors-yapf.git
|
2022-05-12 16:05:23 +08:00
|
|
|
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: https://github.com/pre-commit/pre-commit-hooks.git
|
2022-05-12 16:05:23 +08:00
|
|
|
rev: v3.1.0
|
|
|
|
|
hooks:
|
|
|
|
|
- id: trailing-whitespace
|
2023-03-21 18:10:10 +08:00
|
|
|
exclude: thirdparty/|modelscope/fileio/format/jsonplus.py
|
2022-05-12 16:05:23 +08:00
|
|
|
- id: check-yaml
|
2023-03-21 18:10:10 +08:00
|
|
|
exclude: thirdparty/|modelscope/fileio/format/jsonplus.py
|
2022-05-12 16:05:23 +08:00
|
|
|
- id: end-of-file-fixer
|
2023-03-21 18:10:10 +08:00
|
|
|
exclude: thirdparty/|modelscope/fileio/format/jsonplus.py
|
2022-05-12 16:05:23 +08:00
|
|
|
- id: requirements-txt-fixer
|
2023-03-21 18:10:10 +08:00
|
|
|
exclude: thirdparty/|modelscope/fileio/format/jsonplus.py
|
2022-05-12 16:05:23 +08:00
|
|
|
- id: double-quote-string-fixer
|
2023-03-21 18:10:10 +08:00
|
|
|
exclude: thirdparty/|modelscope/fileio/format/jsonplus.py
|
2022-05-12 16:05:23 +08:00
|
|
|
- id: check-merge-conflict
|
2023-03-21 18:10:10 +08:00
|
|
|
exclude: thirdparty/|modelscope/fileio/format/jsonplus.py
|
2022-05-12 16:05:23 +08:00
|
|
|
- id: fix-encoding-pragma
|
2023-03-21 18:10:10 +08:00
|
|
|
exclude: thirdparty/|modelscope/fileio/format/jsonplus.py
|
2022-05-12 16:05:23 +08:00
|
|
|
args: ["--remove"]
|
|
|
|
|
- id: mixed-line-ending
|
2023-03-21 18:10:10 +08:00
|
|
|
exclude: thirdparty/|modelscope/fileio/format/jsonplus.py
|
2022-05-12 16:05:23 +08:00
|
|
|
args: ["--fix=lf"]
|