Skip to content

Docs: README.md tool.ruff.lint fault #8217

@thernstig

Description

@thernstig
[tool.ruff.lint]
# 1. Enable flake8-bugbear (`B`) rules, in addition to the defaults.
select = ["E", "F", "B"]

The comment says it only enables flake8-bugbear in addition to defaults, but the default is this according to the same page:

[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`)  codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
select = ["E4", "E7", "E9", "F"]
ignore = []

So the above is enabling all E rules in addition to the flake8-bugbear rules.

Solution

Change to:

[tool.ruff.lint]
# 1. Enable flake8-bugbear (`B`) rules and all (`E`) rules, in addition to the defaults.
select = ["E", "F", "B"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions