Skip to content

Ruff

903 rules ruff@0.17.0

Complete effective rule inventory.

Docs

Rules

32 rules on this page · 903 total

  • F406

    from {name} import * only allowed at module level

    No autofix
  • F407

    Future feature {name} is not defined

    No autofix
  • F501

    %-format string has invalid format string: {message}

    No autofix
  • F502

    %-format string expected mapping but got sequence

    No autofix
  • F503

    %-format string expected sequence but got mapping

    No autofix
  • F504

    %-format string has unused named argument(s): {message}

    Always autofixable
  • F505

    %-format string is missing argument(s) for placeholder(s): {message}

    No autofix
  • F506

    %-format string has mixed positional and named placeholders

    No autofix
  • F507

    %-format string has {wanted} placeholder(s) but {got} substitution(s)

    No autofix
  • F508

    %-format string * specifier requires sequence

    No autofix
  • F509

    %-format string has unsupported format character {char}

    No autofix
  • F521

    .format call has invalid format string: {message}

    No autofix
  • F522

    .format call has unused named argument(s): {message}

    Some reports are autofixable
  • F523

    .format call has unused arguments at position(s): {message}

    Some reports are autofixable
  • F524

    .format call is missing argument(s) for placeholder(s): {message}

    No autofix
  • F525

    .format string mixes automatic and manual numbering

    No autofix
  • F541

    f-string without any placeholders

    Always autofixable
  • F601

    Dictionary key literal {name} repeated

    Some reports are autofixable
  • F602

    Dictionary key {name} repeated

    Some reports are autofixable
  • F621

    Too many expressions in star-unpacking assignment

    No autofix
  • F622

    Two starred expressions in assignment

    No autofix
  • F631

    Assert test is a non-empty tuple, which is always True

    No autofix
  • F632

    Use == to compare constant literals

    Always autofixable
  • F633

    Use of >> is invalid with print function

    No autofix
  • F634

    If test is a tuple, which is always True

    No autofix
  • F701

    break outside loop

    No autofix
  • F702

    continue not properly in loop

    No autofix
  • F704

    {keyword} statement outside of a function

    No autofix
  • F706

    return statement outside of a function/method

    No autofix
  • F707

    An except block as not the last exception handler

    No autofix
  • F722

    Syntax error in forward annotation: {parse_error}

    No autofix
  • F811

    Redefinition of unused {name} from {row}

    Some reports are autofixable