diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6a92d57..4a95879 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ ci: submodules: false repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v6.0.0 hooks: - id: check-yaml - id: end-of-file-fixer @@ -21,31 +21,31 @@ repos: - id: check-toml - id: check-added-large-files - repo: https://github.com/psf/black - rev: 24.4.2 + rev: 26.3.1 hooks: - id: black - repo: https://github.com/pycqa/flake8 - rev: 7.0.0 + rev: 7.3.0 hooks: - id: flake8 - repo: https://github.com/pycqa/isort - rev: 5.13.2 + rev: 9.0.0a3 hooks: - id: isort args: ["--profile", "black"] - repo: https://github.com/kynan/nbstripout - rev: 0.7.1 + rev: 0.9.1 hooks: - id: nbstripout - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v6.0.0 hooks: - id: no-commit-to-branch name: Prevent Commit to Main Branch args: ["--branch", "main"] stages: [pre-commit] - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 + rev: v2.4.2 hooks: - id: codespell additional_dependencies: @@ -57,9 +57,9 @@ repos: - id: prettier additional_dependencies: - "prettier@^3.2.4" - # ruff - An extremely fast Python linter and code formatter, written in Rust. - - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.12 + - repo: https://github.com/PyCQA/docformatter + rev: v1.7.8 hooks: - - id: ruff-check - args: [--fix, --config, ./pyproject.toml] + - id: docformatter + additional_dependencies: [tomli] + args: [--in-place, --config, ./pyproject.toml] diff --git a/news/dependency-update.rst b/news/dependency-update.rst new file mode 100644 index 0000000..36747b0 --- /dev/null +++ b/news/dependency-update.rst @@ -0,0 +1,23 @@ +**Added:** + +* No news needed: updating pre-commit hooks, black, flake8, isort, nbstripout and codespell. Switch from ruff to docformatter. Not user facing. + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +* diff --git a/pyproject.toml b/pyproject.toml index dca3168..6499958 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,11 +59,10 @@ exclude-file = ".codespell/ignore_lines.txt" ignore-words = ".codespell/ignore_words.txt" skip = "*.cif,*.dat" -[tool.ruff] -line-length = 72 - -[tool.ruff.lint.pydocstyle] -convention = "numpy" +[tool.docformatter] +recursive = true +wrap-summaries = 72 +wrap-descriptions = 72 [tool.black] line-length = 79