Skip to content

Ruff

902 rules ruff@0.16.8

Complete effective rule inventory.

Docs

Rules

40 rules on this page · 902 total

  • D209

    Multi-line docstring closing quotes should be on a separate line

    Always autofixable
  • D210

    No whitespaces allowed surrounding docstring text

    Some reports are autofixable
  • D211

    No blank lines allowed before class docstring

    Always autofixable
  • D212

    Multi-line docstring summary should start at the first line

    Always autofixable
  • D214

    Section is over-indented ("{name}")

    Always autofixable
  • D215

    Section underline is over-indented ("{name}")

    Always autofixable
  • D300

    Use triple double quotes """

    Some reports are autofixable
  • D301

    Use r""" if any backslashes in a docstring

    Some reports are autofixable
  • D402

    First line should not be the function's signature

    No autofix
  • D414

    Section has no content ("{name}")

    No autofix
  • D418

    Function decorated with @overload shouldn't contain a docstring

    No autofix
  • D419

    Docstring is empty

    No autofix
  • DJ001

    Avoid using null=True on string-based fields such as {field_name}

    No autofix
  • DJ003

    Avoid passing locals() as context to a render function

    No autofix
  • DJ006

    Do not use exclude with ModelForm, use fields instead

    No autofix
  • DJ007

    Do not use __all__ with ModelForm, use fields instead

    No autofix
  • DJ008

    Model does not define __str__ method

    No autofix
  • DJ012

    Order of model's inner classes, methods, and fields does not follow the Django Style Guide: {element_type} should come before {prev_element_type}

    No autofix
  • DJ013

    @receiver decorator must be on top of all the other decorators

    No autofix
  • DOC102

    Documented parameter {id} is not in the function's signature

    No autofix
  • DOC202

    Docstring should not have a returns section because the function doesn't return anything

    No autofix
  • DOC403

    Docstring has a "Yields" section but the function doesn't yield anything

    No autofix
  • DOC502

    Raised exception is not explicitly raised: {id}

    No autofix
  • DTZ001

    datetime.datetime() called without a tzinfo argument

    No autofix
  • DTZ002

    datetime.datetime.today() used

    No autofix
  • DTZ003

    datetime.datetime.utcnow() used

    No autofix
  • DTZ004

    datetime.datetime.utcfromtimestamp() used

    No autofix
  • DTZ005

    datetime.datetime.now() called without a tz argument

    No autofix
  • DTZ006

    datetime.datetime.fromtimestamp() called without a tz argument

    No autofix
  • DTZ007

    Naive datetime constructed using datetime.datetime.strptime() without %z

    No autofix
  • DTZ011

    datetime.date.today() used

    No autofix
  • DTZ012

    datetime.date.fromtimestamp() used

    No autofix
  • DTZ901

    Use of datetime.datetime.{min_max} without timezone information

    No autofix
  • E101

    Indentation contains mixed spaces and tabs

    No autofix
  • E111

    Indentation is not a multiple of {indent_width}

    No autofix
  • E112

    Expected an indented block

    No autofix
  • E113

    Unexpected indentation

    No autofix
  • E114

    Indentation is not a multiple of {indent_width} (comment)

    No autofix
  • E115

    Expected an indented block (comment)

    No autofix
  • E116

    Unexpected indentation (comment)

    No autofix