Skip to content

Formatter trims empty lines after ;  #9958

@MichaReiser

Description

@MichaReiser
b = """
    This looks like a docstring but is not in a notebook because notebooks can't be imported as a module.
    Ruff should leave it as is
""";


a = "another normal string"

The formatter should preserve the empty lines between b and a but it does not today.

Playground

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingformatterRelated to the formatter

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions