From 90150cd4f6c4f5cb63bb335fbf3ec9bd27dcfd94 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Tue, 14 Feb 2023 19:20:46 -0500 Subject: [PATCH] infra: use latest Ruff instead of isort (#581) Signed-off-by: Henry Schreiner --- .pre-commit-config.yaml | 6 +----- pyproject.toml | 13 +++++-------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6a657e66..06180be8 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.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"]