Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add headers to configutation options #2896

Merged
merged 4 commits into from
Feb 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,11 @@ Or, to enable autofix:

<!-- Begin section: Configuration -->

Ruff is configurable both via `pyproject.toml` and the command line. For a full list of configurable
Ruff is configurable both via `pyproject.toml`, `ruff.toml`, and the command line. For a full list of configurable
options, see the [API reference](#reference).

### Configure via `pyproject.toml`

If left unspecified, the default configuration is equivalent to:

```toml
Expand Down Expand Up @@ -362,6 +364,8 @@ If you're wondering how to configure Ruff, here are some **recommended guideline
* By default, Ruff's autofix is aggressive. If you find that it's too aggressive for your liking,
consider turning off autofix for specific rules or categories (see: [FAQ](#ruff-tried-to-fix-something-but-it-broke-my-code-what-should-i-do)).

### Configure via `ruff.toml`

As an alternative to `pyproject.toml`, Ruff will also respect a `ruff.toml` file, which implements
an equivalent schema (though the `[tool.ruff]` hierarchy can be omitted). For example, the
`pyproject.toml` described above would be represented via the following `ruff.toml`:
Expand Down