Skip to content

Ruff

902 rules ruff@0.16.8

Complete effective rule inventory.

Docs

Rules

22 rules on this page · 902 total

  • UP047

    Generic function {name} should use type parameters

    Always autofixable
  • UP048

    Use while True: instead of while 1:

    Always autofixable
  • UP049

    Generic {} uses private type parameters

    Some reports are autofixable
  • UP050

    Class {name} uses metaclass=type, which is redundant

    Some reports are autofixable
  • UP051

    Use @{to} and @abstractmethod instead of {from}

    Always autofixable
  • W191

    Indentation contains tabs

    No autofix
  • W291

    Trailing whitespace

    Always autofixable
  • W292

    No newline at end of file

    Always autofixable
  • W293

    Blank line contains whitespace

    Always autofixable
  • W391

    Too many newlines at end of {domain}

    Always autofixable
  • W505

    Doc line too long ({width} > {limit})

    No autofix
  • W605

    Invalid escape sequence: \{ch}

    Always autofixable
  • YTT101

    sys.version[:3] referenced (python3.10), use sys.version_info

    No autofix
  • YTT102

    sys.version[2] referenced (python3.10), use sys.version_info

    No autofix
  • YTT103

    sys.version compared to string (python3.10), use sys.version_info

    No autofix
  • YTT201

    sys.version_info[0] == 3 referenced (python4), use >=

    No autofix
  • YTT202

    six.PY3 referenced (python4), use not six.PY2

    No autofix
  • YTT203

    sys.version_info[1] compared to integer (python4), compare sys.version_info to tuple

    No autofix
  • YTT204

    sys.version_info.minor compared to integer (python4), compare sys.version_info to tuple

    No autofix
  • YTT301

    sys.version[0] referenced (python10), use sys.version_info

    No autofix
  • YTT302

    sys.version compared to string (python10), use sys.version_info

    No autofix
  • YTT303

    sys.version[:1] referenced (python10), use sys.version_info

    No autofix