mirror of
https://github.com/astral-sh/ruff.git
synced 2025-12-23 09:19:58 +00:00
Document: Fix default lint rules (#8218)
<!-- Thank you for contributing to Ruff! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary closes #8217 <!-- What's the purpose of the change? What does it do, and why? --> ## Test Plan <!-- How was it tested? -->
This commit is contained in:
parent
dbd84c947b
commit
d1c67f91bd
1 changed files with 3 additions and 3 deletions
|
|
@ -78,7 +78,7 @@ As an example, the following would configure Ruff to:
|
|||
```toml
|
||||
[tool.ruff.lint]
|
||||
# 1. Enable flake8-bugbear (`B`) rules, in addition to the defaults.
|
||||
select = ["E", "F", "B"]
|
||||
select = ["E4", "E7", "E9", "F", "B"]
|
||||
|
||||
# 2. Avoid enforcing line-length violations (`E501`)
|
||||
ignore = ["E501"]
|
||||
|
|
@ -101,7 +101,7 @@ Linter plugin configurations are expressed as subsections, e.g.:
|
|||
```toml
|
||||
[tool.ruff.lint]
|
||||
# Add "Q" to the list of enabled codes.
|
||||
select = ["E", "F", "Q"]
|
||||
select = ["E4", "E7", "E9", "F", "Q"]
|
||||
|
||||
[tool.ruff.lint.flake8-quotes]
|
||||
docstring-quotes = "double"
|
||||
|
|
@ -121,7 +121,7 @@ For example, the `pyproject.toml` described above would be represented via the f
|
|||
```toml
|
||||
[lint]
|
||||
# Enable flake8-bugbear (`B`) rules.
|
||||
select = ["E", "F", "B"]
|
||||
select = ["E4", "E7", "E9", "F", "B"]
|
||||
|
||||
# Never enforce `E501` (line length violations).
|
||||
ignore = ["E501"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue