From 64038a8ca02e76c321e1278df3ecc016b6603b85 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 11 Feb 2024 17:08:00 +0000 Subject: [PATCH] chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.2.1 (#561) * chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.2.1 * chore(ruff): use `lint/format` settings --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mathieu Kniewallner --- .pre-commit-config.yaml | 2 +- pyproject.toml | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 563b4ca9..5c20efe6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.1.15" + rev: "v0.2.1" hooks: - id: ruff args: [--exit-non-zero-on-fix] diff --git a/pyproject.toml b/pyproject.toml index fa5bc13e..b859d6e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -111,6 +111,12 @@ norecursedirs = ["data*"] target-version = "py38" line-length = 120 fix = true +extend-exclude = ["tests/data/*"] + +[tool.ruff.format] +preview = true + +[tool.ruff.lint] select = [ # flake8-2020 "YTT", @@ -163,16 +169,12 @@ ignore = [ # DoNotAssignLambda "E731", ] -extend-exclude = ["tests/data/*"] -[tool.ruff.flake8-type-checking] +[tool.ruff.lint.flake8-type-checking] strict = true -[tool.ruff.format] -preview = true - -[tool.ruff.isort] +[tool.ruff.lint.isort] required-imports = ["from __future__ import annotations"] -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "tests/*" = ["S101", "S603"]