Skip to content

Commit

Permalink
docs(configuration): replace extend-exclude with exclude (#8306)
Browse files Browse the repository at this point in the history
## Summary

Similarly to #8302, the
configuration documentation mentions `extend-exclude` for tool specific
configuration, although neither `format` nor `lint` supports it, since
they only support `exclude`.
  • Loading branch information
mkniewallner authored Oct 28, 2023
1 parent c2f6c79 commit 854f5d0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
Expand Down

0 comments on commit 854f5d0

Please sign in to comment.