.pre-commit-config.yaml (2955B)
1 repos: 2 - repo: https://github.com/astral-sh/ruff-pre-commit 3 rev: "v0.4.1" 4 hooks: 5 - id: ruff 6 args: ["--fix"] 7 - id: ruff-format 8 - repo: https://github.com/pre-commit/pre-commit-hooks 9 rev: v4.6.0 10 hooks: 11 - id: trailing-whitespace 12 - id: end-of-file-fixer 13 - id: fix-encoding-pragma 14 args: [--remove] 15 - id: check-yaml 16 - id: debug-statements 17 exclude: _pytest/(debugging|hookspec).py 18 language_version: python3 19 - repo: https://github.com/adamchainz/blacken-docs 20 rev: 1.16.0 21 hooks: 22 - id: blacken-docs 23 additional_dependencies: [black==24.1.1] 24 - repo: https://github.com/pre-commit/pygrep-hooks 25 rev: v1.10.0 26 hooks: 27 - id: python-use-type-annotations 28 - repo: https://github.com/pre-commit/mirrors-mypy 29 rev: v1.9.0 30 hooks: 31 - id: mypy 32 files: ^(src/|testing/|scripts/) 33 args: [] 34 additional_dependencies: 35 - iniconfig>=1.1.0 36 - attrs>=19.2.0 37 - pluggy>=1.5.0 38 - packaging 39 - tomli 40 - types-pkg_resources 41 - types-tabulate 42 # for mypy running on python>=3.11 since exceptiongroup is only a dependency 43 # on <3.11 44 - exceptiongroup>=1.0.0rc8 45 - repo: https://github.com/tox-dev/pyproject-fmt 46 rev: "1.8.0" 47 hooks: 48 - id: pyproject-fmt 49 # https://pyproject-fmt.readthedocs.io/en/latest/#calculating-max-supported-python-version 50 additional_dependencies: ["tox>=4.9"] 51 - repo: local 52 hooks: 53 - id: pylint 54 name: pylint 55 entry: pylint 56 language: system 57 types: [python] 58 args: ["-rn", "-sn", "--fail-on=I"] 59 stages: [manual] 60 - id: rst 61 name: rst 62 entry: rst-lint --encoding utf-8 63 files: ^(RELEASING.rst|README.rst|TIDELIFT.rst)$ 64 language: python 65 additional_dependencies: [pygments, restructuredtext_lint] 66 - id: changelogs-rst 67 name: changelog filenames 68 language: fail 69 entry: 'changelog files must be named ####.(breaking|bugfix|deprecation|doc|feature|improvement|trivial|vendor).rst' 70 exclude: changelog/(\d+\.(breaking|bugfix|deprecation|doc|feature|improvement|trivial|vendor).rst|README.rst|_template.rst) 71 files: ^changelog/ 72 - id: py-deprecated 73 name: py library is deprecated 74 language: pygrep 75 entry: > 76 (?x)\bpy\.( 77 _code\.| 78 builtin\.| 79 code\.| 80 io\.| 81 path\.local\.sysfind| 82 process\.| 83 std\.| 84 error\.| 85 xml\. 86 ) 87 types: [python] 88 - id: py-path-deprecated 89 name: py.path usage is deprecated 90 exclude: docs|src/_pytest/deprecated.py|testing/deprecated_test.py|src/_pytest/legacypath.py 91 language: pygrep 92 entry: \bpy\.path\.local 93 types: [python]