From 6a0efc1edf44dd5707889a0aff25d618cd67cb46 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Mon, 3 Apr 2023 19:20:44 -0400 Subject: [PATCH] Touch up README --- README.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 2a82c7f..8d11e66 100644 --- a/README.md +++ b/README.md @@ -5,10 +5,6 @@ A [pre-commit](https://pre-commit.com/) hook for [Ruff](https://github.com/charl Distributed as a standalone repository to enable installing Ruff via prebuilt wheels from [PyPI](https://pypi.org/project/ruff/). -For pre-commit: see https://github.com/pre-commit/pre-commit - -For Ruff: see https://github.com/charliermarsh/ruff - ### Using Ruff with pre-commit Add this to your `.pre-commit-config.yaml`: @@ -16,7 +12,7 @@ Add this to your `.pre-commit-config.yaml`: ```yaml - repo: https://github.com/charliermarsh/ruff-pre-commit # Ruff version. - rev: 'v0.0.257' + rev: 'v0.0.260' hooks: - id: ruff ``` @@ -26,14 +22,16 @@ Or, to enable autofix: ```yaml - repo: https://github.com/charliermarsh/ruff-pre-commit # Ruff version. - rev: 'v0.0.257' + rev: 'v0.0.260' hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] ``` -Note that Ruff's pre-commit hook should run before Black, isort, and other -formatting tools. +Ruff's pre-commit hook should be placed after other formatting tools, such as Black and isort, +_unless_ you enable autofix, in which case, Ruff's pre-commit hook should run _before_ Black, isort, +and other formatting tools, as Ruff's autofix behavior can output code changes that require +reformatting. ## License