Skip to content

D411: Missing blank line before section -- false positive #7216

@pepoluan

Description

@pepoluan

The code looks like this:

class JobProgress:
    """
    Tracks progress by generating job batches and recording the last issued job.
    
    Attributes
    ----------
        next_coordinate(int):
    """

Ruff D411 complains that a blank line must precede the Attributes section.

But as you can see, there is actually a blank line ... though it actually contains 4 spaces, this is due to the auto-indent feature of my IDE (PyCharm).

Such a line (containing only spaces) should not trigger D411 because visually they are the same.

I am using ruff 0.0.277 on Windows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docstringRelated to docstring linting or formatting

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions