2023-04-14 20:36:16 +08:00
|
|
|
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
2023-02-18 08:06:24 +08:00
|
|
|
# Pre-commit hooks. For more information see https://github.com/pre-commit/pre-commit-hooks/blob/main/README.md
|
2021-10-29 00:35:01 +08:00
|
|
|
|
2023-02-06 19:11:32 +08:00
|
|
|
exclude: 'docs/'
|
2021-10-29 00:35:01 +08:00
|
|
|
# Define bot property if installed via https://github.com/marketplace/pre-commit-ci
|
|
|
|
ci:
|
|
|
|
autofix_prs: true
|
|
|
|
autoupdate_commit_msg: '[pre-commit.ci] pre-commit suggestions'
|
2022-04-23 04:43:50 +08:00
|
|
|
autoupdate_schedule: monthly
|
2021-10-29 00:35:01 +08:00
|
|
|
# submodules: true
|
|
|
|
|
|
|
|
repos:
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2023-11-07 06:56:27 +08:00
|
|
|
rev: v4.5.0
|
2021-10-29 00:35:01 +08:00
|
|
|
hooks:
|
2023-02-18 08:06:24 +08:00
|
|
|
- id: end-of-file-fixer
|
2021-10-29 00:35:01 +08:00
|
|
|
- id: trailing-whitespace
|
|
|
|
- id: check-case-conflict
|
2023-07-05 06:42:57 +08:00
|
|
|
# - id: check-yaml
|
2021-10-29 00:35:01 +08:00
|
|
|
- id: check-docstring-first
|
2023-02-18 08:06:24 +08:00
|
|
|
- id: double-quote-string-fixer
|
|
|
|
- id: detect-private-key
|
2021-10-29 00:35:01 +08:00
|
|
|
|
|
|
|
- repo: https://github.com/asottile/pyupgrade
|
2023-11-07 06:56:27 +08:00
|
|
|
rev: v3.15.0
|
2021-10-29 00:35:01 +08:00
|
|
|
hooks:
|
|
|
|
- id: pyupgrade
|
|
|
|
name: Upgrade code
|
|
|
|
|
2023-02-18 08:06:24 +08:00
|
|
|
- repo: https://github.com/PyCQA/isort
|
|
|
|
rev: 5.12.0
|
|
|
|
hooks:
|
|
|
|
- id: isort
|
|
|
|
name: Sort imports
|
2021-10-29 00:35:01 +08:00
|
|
|
|
2023-02-08 15:27:08 +08:00
|
|
|
- repo: https://github.com/google/yapf
|
2023-10-03 21:46:59 +08:00
|
|
|
rev: v0.40.2
|
2022-03-31 22:52:34 +08:00
|
|
|
hooks:
|
|
|
|
- id: yapf
|
2022-03-31 23:26:34 +08:00
|
|
|
name: YAPF formatting
|
2021-10-29 00:35:01 +08:00
|
|
|
|
2022-04-23 04:36:27 +08:00
|
|
|
- repo: https://github.com/executablebooks/mdformat
|
2023-09-06 03:31:00 +08:00
|
|
|
rev: 0.7.17
|
2022-04-23 04:36:27 +08:00
|
|
|
hooks:
|
|
|
|
- id: mdformat
|
2022-04-23 04:43:50 +08:00
|
|
|
name: MD formatting
|
2022-04-23 04:36:27 +08:00
|
|
|
additional_dependencies:
|
|
|
|
- mdformat-gfm
|
|
|
|
- mdformat-black
|
2023-02-06 19:11:32 +08:00
|
|
|
# exclude: "README.md|README.zh-CN.md|CONTRIBUTING.md"
|
2021-10-29 00:35:01 +08:00
|
|
|
|
|
|
|
- repo: https://github.com/PyCQA/flake8
|
2023-08-08 07:52:45 +08:00
|
|
|
rev: 6.1.0
|
2021-10-29 00:35:01 +08:00
|
|
|
hooks:
|
|
|
|
- id: flake8
|
|
|
|
name: PEP8
|
2023-02-06 19:11:32 +08:00
|
|
|
|
2023-02-18 08:06:24 +08:00
|
|
|
- repo: https://github.com/codespell-project/codespell
|
2023-10-03 21:46:59 +08:00
|
|
|
rev: v2.2.6
|
2023-02-18 08:06:24 +08:00
|
|
|
hooks:
|
|
|
|
- id: codespell
|
|
|
|
args:
|
|
|
|
- --ignore-words-list=crate,nd,strack,dota
|
2023-02-06 19:11:32 +08:00
|
|
|
|
2023-07-05 06:42:57 +08:00
|
|
|
# - repo: https://github.com/asottile/yesqa
|
|
|
|
# rev: v1.4.0
|
|
|
|
# hooks:
|
|
|
|
# - id: yesqa
|
|
|
|
|
|
|
|
# - repo: https://github.com/asottile/dead
|
|
|
|
# rev: v1.5.0
|
|
|
|
# hooks:
|
|
|
|
# - id: dead
|