docs(configuration): replace extend-exclude with exclude (#8306)

## Summary

Similarly to https://github.com/astral-sh/ruff/pull/8302, the
configuration documentation mentions `extend-exclude` for tool specific
configuration, although neither `format` nor `lint` supports it, since
they only support `exclude`.
This commit is contained in:
Mathieu Kniewallner 2023-10-28 23:08:00 +02:00 committed by GitHub
parent c2f6c79b3d
commit 854f5d09fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -189,13 +189,13 @@ When passed a path on the command-line, Ruff will automatically discover all Pyt
path, taking into account the [`exclude`](settings.md#exclude) and [`extend-exclude`](settings.md#extend-exclude)
settings in each directory's `pyproject.toml` file.
Files can also be selectively excluded from linting or formatting by scoping the `exclude` and
`extend-exclude` settings to the tool-specific configuration tables. For example, the following
would prevent `ruff` from formatting `.pyi` files, but would continue to include them in linting:
Files can also be selectively excluded from linting or formatting by scoping the `exclude` setting
to the tool-specific configuration tables. For example, the following would prevent `ruff` from
formatting `.pyi` files, but would continue to include them in linting:
```toml
[tool.ruff.format]
extend-exclude = ["*.pyi"]
exclude = ["*.pyi"]
```
By default, Ruff will also skip any files that are omitted via `.ignore`, `.gitignore`,