From d7144d6d8eb06177be977fdbdf3ec38ea1c8f721 Mon Sep 17 00:00:00 2001 From: Steven DeMartini <1647130+sjdemartini@users.noreply.github.com> Date: Fri, 10 Nov 2023 19:07:32 -0800 Subject: [PATCH] Fix docs typo for `ruff format` preview configuration (#8611) ## Summary The ruff configuration section is called "format", rather than "preview". Using the configuration as it was written in the docs gives an error: ``` $ ruff format --check . ruff failed Cause: TOML parse error at line 143, column 1 | 143 | [tool.ruff.preview] | ^^^^^^^^^^^^^^^^^^^ invalid type: map, expected a boolean ``` ## Test Plan Tested running `ruff format` with the following in my `pyproject.toml`: ```toml [tool.ruff.format] preview = true ``` and it worked properly (using preview rules for formatting). --- docs/preview.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/preview.md b/docs/preview.md index 1cdcab0729..1bea9e451d 100644 --- a/docs/preview.md +++ b/docs/preview.md @@ -32,14 +32,14 @@ To enable preview style formatting without enabling any preview lint rules: === "pyproject.toml" ```toml - [tool.ruff.preview] + [tool.ruff.format] preview = true ``` === "ruff.toml" ```toml - [preview] + [format] preview = true ```