2020-02-01 10:14:55 +08:00
|
|
|
exclude: ^tests/data/
|
2019-12-12 21:40:42 +08:00
|
|
|
repos:
|
2022-05-16 20:47:56 +08:00
|
|
|
- repo: https://github.com/PyCQA/flake8
|
2022-10-08 11:48:44 +08:00
|
|
|
rev: 5.0.4
|
2020-04-20 01:23:53 +08:00
|
|
|
hooks:
|
|
|
|
- id: flake8
|
2022-02-09 21:29:21 +08:00
|
|
|
- repo: https://github.com/PyCQA/isort
|
|
|
|
rev: 5.10.1
|
2020-04-20 01:23:53 +08:00
|
|
|
hooks:
|
2020-02-02 18:18:17 +08:00
|
|
|
- id: isort
|
2020-04-20 01:23:53 +08:00
|
|
|
- repo: https://github.com/pre-commit/mirrors-yapf
|
2022-10-08 11:48:44 +08:00
|
|
|
rev: v0.32.0
|
2020-04-20 01:23:53 +08:00
|
|
|
hooks:
|
|
|
|
- id: yapf
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2022-10-08 11:48:44 +08:00
|
|
|
rev: v4.3.0
|
2020-04-20 01:23:53 +08:00
|
|
|
hooks:
|
|
|
|
- id: trailing-whitespace
|
|
|
|
- id: check-yaml
|
|
|
|
- id: end-of-file-fixer
|
|
|
|
- id: requirements-txt-fixer
|
|
|
|
- id: double-quote-string-fixer
|
2020-07-04 02:53:51 +08:00
|
|
|
- id: check-merge-conflict
|
2020-04-20 01:23:53 +08:00
|
|
|
- id: fix-encoding-pragma
|
|
|
|
args: ["--remove"]
|
|
|
|
- id: mixed-line-ending
|
|
|
|
args: ["--fix=lf"]
|
2021-10-04 20:13:54 +08:00
|
|
|
- repo: https://github.com/codespell-project/codespell
|
2022-10-08 11:48:44 +08:00
|
|
|
rev: v2.2.1
|
2021-10-04 20:13:54 +08:00
|
|
|
hooks:
|
|
|
|
- id: codespell
|
2022-05-16 20:47:56 +08:00
|
|
|
- repo: https://github.com/executablebooks/mdformat
|
2022-06-09 17:47:26 +08:00
|
|
|
rev: 0.7.9
|
2022-05-16 20:47:56 +08:00
|
|
|
hooks:
|
|
|
|
- id: mdformat
|
|
|
|
args: ["--number"]
|
|
|
|
additional_dependencies:
|
2022-06-09 17:47:26 +08:00
|
|
|
- mdformat-openmmlab
|
2022-05-16 20:47:56 +08:00
|
|
|
- mdformat_frontmatter
|
|
|
|
- linkify-it-py
|
2020-07-04 00:55:25 +08:00
|
|
|
- repo: https://github.com/myint/docformatter
|
|
|
|
rev: v1.3.1
|
|
|
|
hooks:
|
|
|
|
- id: docformatter
|
|
|
|
args: ["--in-place", "--wrap-descriptions", "79"]
|
2022-05-18 11:47:14 +08:00
|
|
|
- repo: https://github.com/asottile/pyupgrade
|
2022-10-08 11:48:44 +08:00
|
|
|
rev: v3.0.0
|
2022-05-18 11:47:14 +08:00
|
|
|
hooks:
|
|
|
|
- id: pyupgrade
|
|
|
|
args: ["--py36-plus"]
|
2022-02-24 09:24:25 +08:00
|
|
|
- repo: https://github.com/open-mmlab/pre-commit-hooks
|
|
|
|
rev: v0.2.0 # Use the ref you want to point at
|
|
|
|
hooks:
|
|
|
|
- id: check-copyright
|
|
|
|
args: ["mmcv", "tests", "--excludes", "mmcv/ops"]
|
2022-05-10 14:01:07 +08:00
|
|
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
|
|
rev: v0.812
|
|
|
|
hooks:
|
|
|
|
- id: mypy
|
|
|
|
exclude: |-
|
|
|
|
(?x)(
|
|
|
|
^test
|
|
|
|
| ^docs
|
|
|
|
)
|
2020-09-29 10:44:44 +08:00
|
|
|
# - repo: local
|
|
|
|
# hooks:
|
|
|
|
# - id: clang-format
|
|
|
|
# name: clang-format
|
|
|
|
# description: Format files with ClangFormat
|
|
|
|
# entry: clang-format -style=google -i
|
|
|
|
# language: system
|
|
|
|
# files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|cuh|proto)$
|