repos: # 删除未使用导入和变量 - repo: https://github.com/PyCQA/autoflake rev: v2.2.0 hooks: - id: autoflake # 导入排序 # - repo: https://github.com/PyCQA/isort # rev: 5.12.0 # hooks: # - id: isort # args: ["--line-length=120"] # 格式化代码 # - repo: https://github.com/psf/black # rev: 22.3.0 # hooks: # - id: black # args: ["--line-length=120"] - repo: https://github.com/PyCQA/flake8 rev: 5.0.4 hooks: - id: flake8 args: ["--max-line-length=120"] # 安全性检查 # - repo: https://github.com/PyCQA/bandit # rev: 1.7.1 # hooks: # - id: bandit fail_fast: false