From 35cd57d0fcaa3bd8d85ce86b00adf241aacf4faa Mon Sep 17 00:00:00 2001 From: konstin Date: Wed, 31 May 2023 18:19:15 +0200 Subject: [PATCH] Make running ruff on ruff possible (#4760) I was wondering why `pip install -U ruff && ruff .` in the ruff repo would result in only noise while the pre-commit ruff works. Turns out the pre-commit has an exclude for the resources directories. This adds the excludes from pre-commit to ruff's own pyproject.toml so `ruff .` works on ruff itself --- pyproject.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 658c31fb87..77118d4e10 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,6 +54,12 @@ exclude = [ "crates/ruff/src/rules/*/snapshots/**/*" ] +[tool.ruff] +extend-exclude = [ + "crates/ruff/resources/", + "crates/ruff_python_formatter/resources/" +] + [tool.black] force-exclude = ''' /(