From 7d8fa88541f5d25dac549396e991f3a75dcd33c7 Mon Sep 17 00:00:00 2001 From: Heinz-Alexander Fuetterer Date: Thu, 5 Sep 2024 16:57:00 +0200 Subject: [PATCH] chore: bump ruff pre-commit hook version --- .gitignore | 3 +++ .pre-commit-config.yaml | 4 ++-- pyproject.toml | 12 +++++++----- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 048a0b41c..fe6618f3d 100644 --- a/.gitignore +++ b/.gitignore @@ -168,3 +168,6 @@ docs/api/_autosummary # tests tests/figures + +# Ruff +.ruff_cache diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f6fdd2adc..e582f17df 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -56,8 +56,8 @@ repos: rev: v1.1.1 hooks: - id: doc8 -- repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.270 +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.6.3 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/pyproject.toml b/pyproject.toml index a144f3bb7..535604c01 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -107,6 +107,9 @@ include-package-data = true [tool.ruff] target-version = "py38" +line-length = 120 + +[tool.ruff.lint] exclude = [ ".eggs", ".git", @@ -136,7 +139,6 @@ ignore = [ # Missing docstring in magic method "D105", ] -line-length = 120 select = [ "D", # flake8-docstrings "E", # pycodestyle @@ -155,15 +157,15 @@ select = [ "RET", # flake8-raise ] unfixable = ["B", "UP", "C4", "BLE", "T20", "RET"] -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "tests/*" = ["D"] "*/__init__.py" = ["F401"] "docs/*" = ["D"] -[tool.ruff.pydocstyle] +[tool.ruff.lint.pydocstyle] convention = "numpy" -[tool.ruff.flake8-tidy-imports] +[tool.ruff.lint.flake8-tidy-imports] ban-relative-imports = "all" -[tool.ruff.flake8-quotes] +[tool.ruff.lint.flake8-quotes] inline-quotes = "double" [tool.black]