Ruff

ruff check a.py --select "I001,E,F"

ruff format a.py

pre-commit run --all-files ruff

pyproject.toml

[tool.ruff]

select = [

    # Pyflakes

    "E",

    # pycodestyle

    "F",

    # isort

    "I001",

]


# Ignore `E402` (import violations) in all `__init__.py` files

[tool.ruff.per-file-ignores]

"__init__.py" = ["E402"]

 .pre-commit-config.yaml

repos:

  - repo: https://github.com/charliermarsh/ruff-pre-commit

    rev: "v0.0.220"

    hooks:

      - id: ruff

        args: ["--select", "E,F,I001"]

 Skip an entire file

# ruff: noqa