1default_language_version: 2 python: "3.10" 3 4repos: 5 - repo: "https://github.com/asottile/pyupgrade" 6 rev: "v3.19.1" 7 hooks: 8 - id: "pyupgrade" 9 name: "Enforce Python 3.7+ idioms" 10 args: 11 - "--py37-plus" 12 13 - repo: https://github.com/astral-sh/ruff-pre-commit 14 rev: "v0.9.6" 15 hooks: 16 - id: ruff 17 args: ["--fix"] 18 - id: ruff-format 19 - repo: https://github.com/codespell-project/codespell 20 rev: v2.4.1 21 hooks: 22 - id: codespell 23 args: 24 - --ignore-words-list=wronly,afile,assertIn 25 - repo: https://github.com/asottile/blacken-docs 26 rev: 1.19.1 27 hooks: 28 - id: blacken-docs 29 additional_dependencies: [ black==24.4.2 ] 30 - repo: https://github.com/pre-commit/pre-commit-hooks 31 rev: v5.0.0 32 hooks: 33 - id: trailing-whitespace 34 - id: end-of-file-fixer 35 - id: fix-encoding-pragma 36 args: [ --remove ] 37 - id: check-yaml 38 - id: debug-statements 39 language_version: python3 40 - repo: https://github.com/PyCQA/autoflake 41 rev: v2.3.1 42 hooks: 43 - id: autoflake 44 name: autoflake 45 args: ["--in-place", "--remove-unused-variables", "--remove-all-unused-imports"] 46 language: python 47 files: \.py$ 48 - repo: https://github.com/pre-commit/mirrors-mypy 49 rev: v1.15.0 50 hooks: 51 - id: mypy 52 exclude: (docs|pyfakefs/tests) 53