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
|
2022-12-07 07:12:20 +08:00
|
|
|
rev: v4.4.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
|
|
|
|
- id: check-yaml
|
|
|
|
- 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-06-06 06:29:58 +08:00
|
|
|
rev: v3.4.0
|
2021-10-29 00:35:01 +08:00
|
|
|
hooks:
|
|
|
|
- id: pyupgrade
|
|
|
|
name: Upgrade code
|
2023-02-06 19:11:32 +08:00
|
|
|
args: [--py37-plus]
|
2021-10-29 00:35:01 +08:00
|
|
|
|
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-05-03 04:14:10 +08:00
|
|
|
rev: v0.33.0
|
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
|
2022-09-07 00:00:26 +08:00
|
|
|
rev: 0.7.16
|
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-02-08 15:27:08 +08:00
|
|
|
rev: 6.0.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-04-04 19:12:53 +08:00
|
|
|
rev: v2.2.4
|
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
|
|
|
|
|
|
|
#- repo: https://github.com/asottile/yesqa
|
|
|
|
# rev: v1.4.0
|
|
|
|
# hooks:
|
|
|
|
# - id: yesqa
|