2022-05-10 01:23:52 +08:00
|
|
|
|
2021-12-23 02:48:00 +08:00
|
|
|
exclude: ^tests/data/
|
|
|
|
repos:
|
2022-05-31 16:21:53 +08:00
|
|
|
- repo: https://github.com/PyCQA/flake8
|
|
|
|
rev: 4.0.1
|
2021-12-23 02:48:00 +08:00
|
|
|
hooks:
|
|
|
|
- id: flake8
|
2023-02-01 22:51:38 +08:00
|
|
|
- repo: https://github.com/PyCQA/isort
|
|
|
|
rev: 5.11.5
|
2021-12-23 02:48:00 +08:00
|
|
|
hooks:
|
|
|
|
- id: isort
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-yapf
|
|
|
|
rev: v0.30.0
|
|
|
|
hooks:
|
|
|
|
- id: yapf
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
|
|
rev: v3.1.0
|
|
|
|
hooks:
|
|
|
|
- id: trailing-whitespace
|
|
|
|
- id: check-yaml
|
|
|
|
- id: end-of-file-fixer
|
|
|
|
- id: requirements-txt-fixer
|
|
|
|
- id: double-quote-string-fixer
|
|
|
|
- id: check-merge-conflict
|
|
|
|
- id: fix-encoding-pragma
|
|
|
|
args: ["--remove"]
|
|
|
|
- id: mixed-line-ending
|
|
|
|
args: ["--fix=lf"]
|
|
|
|
- repo: https://github.com/codespell-project/codespell
|
|
|
|
rev: v2.1.0
|
|
|
|
hooks:
|
|
|
|
- id: codespell
|
2022-05-19 11:41:35 +08:00
|
|
|
- repo: https://github.com/executablebooks/mdformat
|
|
|
|
rev: 0.7.14
|
|
|
|
hooks:
|
|
|
|
- id: mdformat
|
|
|
|
args: ["--number"]
|
|
|
|
additional_dependencies:
|
|
|
|
- mdformat-gfm
|
|
|
|
- mdformat_frontmatter
|
|
|
|
- linkify-it-py
|
2021-12-23 02:48:00 +08:00
|
|
|
- repo: https://github.com/myint/docformatter
|
|
|
|
rev: v1.3.1
|
|
|
|
hooks:
|
|
|
|
- id: docformatter
|
|
|
|
args: ["--in-place", "--wrap-descriptions", "79"]
|
2022-05-31 16:21:53 +08:00
|
|
|
- repo: https://github.com/executablebooks/mdformat
|
2022-06-15 19:20:15 +08:00
|
|
|
rev: 0.7.9
|
2022-05-31 16:21:53 +08:00
|
|
|
hooks:
|
|
|
|
- id: mdformat
|
|
|
|
args: ["--number"]
|
|
|
|
additional_dependencies:
|
|
|
|
- mdformat-gfm
|
|
|
|
- mdformat_frontmatter
|
|
|
|
- linkify-it-py
|
2022-03-02 20:29:28 +08:00
|
|
|
- repo: https://github.com/open-mmlab/pre-commit-hooks
|
|
|
|
rev: v0.2.0
|
|
|
|
hooks:
|
|
|
|
- id: check-algo-readme
|
|
|
|
- id: check-copyright
|
|
|
|
args: [ "mmrazor", "tests", "tools"]
|
2022-05-19 11:41:35 +08:00
|
|
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
|
|
rev: v0.812
|
|
|
|
hooks:
|
|
|
|
- id: mypy
|
|
|
|
exclude: |-
|
|
|
|
(?x)(
|
|
|
|
^test
|
|
|
|
| ^docs
|
2022-06-01 15:12:52 +08:00
|
|
|
| ^configs
|
2023-02-20 14:29:42 +08:00
|
|
|
| ^.*/configs*
|
2023-04-23 17:03:01 +08:00
|
|
|
| ^projects
|
2022-05-19 11:41:35 +08:00
|
|
|
)
|