Skip to content

Commit

Permalink
Fix documentation snafu that recommended invalid settings (#9018)
Browse files Browse the repository at this point in the history
  • Loading branch information
eli-schwartz committed Dec 7, 2023
1 parent ebc7ac3 commit fcc0889
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,21 +301,20 @@ For example, `ruff check /path/to/excluded/file.py` will always lint `file.py`.

### Default inclusions

By default, Ruff will discover files matching `*.py`, `*.ipy`, or `pyproject.toml`.
By default, Ruff will discover files matching `*.py`, `*.ipy`, or `pyproject.toml`.

To lint or format files with additional file extensions, use the [`extend-include`](settings.md#extend-include) setting.

=== "pyproject.toml"

```toml
[tool.ruff.lint]
[tool.ruff]
extend-include = ["*.ipynb"]
```

=== "ruff.toml"

```toml
[lint]
extend-include = ["*.ipynb"]
```

Expand All @@ -325,14 +324,13 @@ You can also change the default selection using the [`include`](settings.md#incl
=== "pyproject.toml"

```toml
[tool.ruff.lint]
[tool.ruff]
include = ["pyproject.toml", "src/**/*.py", "scripts/**/*.py"]
```

=== "ruff.toml"

```toml
[lint]
include = ["pyproject.toml", "src/**/*.py", "scripts/**/*.py"]
```

Expand Down

0 comments on commit fcc0889

Please sign in to comment.