diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3b8920c694..3dcb66e0cd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,14 +6,13 @@ files: | noxfile\.py| setup\.py| docs\/.+\.py| - lib\/.+\.py| - benchmarks\/.+\.py + benchmarks\/.+\.py| ) minimum_pre_commit_version: 1.21.0 repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: # Prevent giant files from being committed. - id: check-added-large-files @@ -28,35 +27,30 @@ repos: # Don't commit to main branch. - id: no-commit-to-branch +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: "v0.3.4" + hooks: + - id: ruff + types: [file, python] + args: [--fix, --show-fixes] + - id: ruff-format + types: [file, python] + - repo: https://github.com/codespell-project/codespell - rev: "v2.2.4" + rev: "v2.2.6" hooks: - id: codespell types_or: [asciidoc, python, markdown, rst] additional_dependencies: [tomli] -- repo: https://github.com/psf/black - rev: 23.3.0 - hooks: - - id: black - pass_filenames: false - args: [--config=./pyproject.toml, .] - - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + rev: 7.0.0 hooks: - id: flake8 types: [file, python] -- repo: https://github.com/pycqa/isort - rev: 5.12.0 - hooks: - - id: isort - types: [file, python] - args: [--filter-files] - - repo: https://github.com/asottile/blacken-docs - rev: 1.13.0 + rev: 1.16.0 hooks: - id: blacken-docs types: [file, rst] @@ -66,3 +60,9 @@ repos: hooks: - id: sort-all types: [file, python] + +- repo: https://github.com/numpy/numpydoc + rev: v1.7.0 + hooks: + - id: numpydoc-validation + types: [file, python] \ No newline at end of file