Skip to content

Python linters

Ruff

Issues

Usage

Ignore rules: Error suppression, i.e.:

# Ignore E741 and F841.
i = 1  # noqa: E741, F841

# Ignore _all_ violations.
x = 1  # noqa

Pyright

Basedpyright

pyright fork with various type checking improvements, improved vscode support and pylance features built into the language server

File-level Type Controls: Globally ignore for whole file (insert at the top of file), i.e.:

# pyright: reportAny=false,reportUnknownVariableType=false,reportUnknownMemberType=false

Line-level Diagnostic Suppression:

updated_rules.append(rule)  # pyright: ignore[reportUnknownArgumentType]