From 2f3b5367ffd91b7abb84a2dde5cc47aecab13df0 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Mon, 12 Dec 2022 21:36:39 -0500 Subject: [PATCH] Add a note on extends to README --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f4b97ead0d..015c10cae8 100644 --- a/README.md +++ b/README.md @@ -354,7 +354,16 @@ There are a few exceptions to these rules: Unlike [ESLint](https://eslint.org/docs/latest/user-guide/configuring/configuration-files#cascading-and-hierarchy), Ruff does not merge settings across configuration files; instead, the "closest" configuration file -is used, and any parent configuration files are ignored. +is used, and any parent configuration files are ignored. In lieu of this implicit cascade, Ruff +supports an [`extend`](#extend) field, which allows you to inherit the settings from another +`pyproject.toml` file, like so: + +```toml +# Extend the `pyproject.toml` file in the parent directory. +extend = "../pyproject.toml" +# But use a different line length. +line-length = 100 +``` ### Ignoring errors