Skip to content

Ruff

902 rules ruff@0.16.8

Complete effective rule inventory.

Docs

Rules

40 rules on this page · 902 total

  • E117

    Over-indented (comment)

    No autofix
  • E201

    Whitespace after '{symbol}'

    Always autofixable
  • E202

    Whitespace before '{symbol}'

    Always autofixable
  • E203

    Whitespace before '{symbol}'

    Always autofixable
  • E204

    Whitespace after decorator

    Always autofixable
  • E211

    Whitespace before '{bracket}'

    Always autofixable
  • E221

    Multiple spaces before operator

    Always autofixable
  • E222

    Multiple spaces after operator

    Always autofixable
  • E223

    Tab before operator

    Always autofixable
  • E224

    Tab after operator

    Always autofixable
  • E225

    Missing whitespace around operator

    Always autofixable
  • E226

    Missing whitespace around arithmetic operator

    Always autofixable
  • E227

    Missing whitespace around bitwise or shift operator

    Always autofixable
  • E228

    Missing whitespace around modulo operator

    Always autofixable
  • E231

    Missing whitespace after {}

    Always autofixable
  • E241

    Multiple spaces after comma

    Always autofixable
  • E242

    Tab after comma

    Always autofixable
  • E251

    Unexpected spaces around keyword / parameter equals

    Always autofixable
  • E252

    Missing whitespace around parameter equals

    Always autofixable
  • E261

    Insert at least two spaces before an inline comment

    Always autofixable
  • E262

    Inline comment should start with #

    Always autofixable
  • E265

    Block comment should start with #

    Always autofixable
  • E266

    Too many leading # before block comment

    Always autofixable
  • E271

    Multiple spaces after keyword

    Always autofixable
  • E272

    Multiple spaces before keyword

    Always autofixable
  • E273

    Tab after keyword

    Always autofixable
  • E274

    Tab before keyword

    Always autofixable
  • E275

    Missing whitespace after keyword

    Always autofixable
  • E301

    Expected {BLANK_LINES_NESTED_LEVEL:?} blank line, found 0

    Always autofixable
  • E302

    Expected {expected_blank_lines:?} blank lines, found {actual_blank_lines}

    Always autofixable
  • E303

    Too many blank lines ({actual_blank_lines})

    Always autofixable
  • E304

    Blank lines found after function decorator ({lines})

    Always autofixable
  • E305

    Expected 2 blank lines after class or function definition, found ({blank_lines})

    Always autofixable
  • E306

    Expected 1 blank line before a nested definition, found 0

    Always autofixable
  • E401

    Multiple imports on one line

    Always autofixable
  • E402

    Module level import not at top of cell

    Some reports are autofixable
  • E502

    Redundant backslash

    Always autofixable
  • E701

    Multiple statements on one line (colon)

    No autofix
  • E702

    Multiple statements on one line (semicolon)

    No autofix
  • E703

    Statement ends with an unnecessary semicolon

    Always autofixable