From fc81ff281369d516bcb76b9439626398b879b6e2 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Tue, 14 Feb 2023 18:00:01 -0500 Subject: [PATCH] infra: use latest Ruff instead of isort Signed-off-by: Henry Schreiner --- .pre-commit-config.yaml | 8 ++------ pyproject.toml | 13 +++++-------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 16ebc206..1cf05be1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,15 +34,11 @@ repos: rev: "v3.0.0-alpha.4" hooks: - id: prettier - - repo: https://github.com/PyCQA/isort - rev: 5.12.0 - hooks: - - id: isort - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.238 + rev: v0.0.246 hooks: - id: ruff - args: [--fix, --format, grouped] + args: [--fix, --format, grouped, --show-fixes] - repo: https://github.com/codespell-project/codespell rev: "v2.2.2" hooks: diff --git a/pyproject.toml b/pyproject.toml index 5c28a06e..1a4e59b2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -133,14 +133,6 @@ line-length = 127 skip-string-normalization = true target-version = ["py311", "py310", "py39", "py38", "py37"] -[tool.isort] -profile = "black" -lines_between_types = 1 -lines_after_imports = 2 -line_length = 127 -known_first_party = "build" -skip = [] # "build" is included in the default skip list - [tool.ruff] line-length = 127 exclude = [] @@ -162,3 +154,8 @@ target-version = "py37" [tool.ruff.mccabe] max-complexity = 10 + +[tool.ruff.isort] +lines-between-types = 1 +lines-after-imports = 2 +known-first-party = ["build"]