Skip to content

Enforce blank line after module docstring #1872

@lsorber

Description

@lsorber

Black does not have an opinion on whether there should be a blank line immediately after a module's docstring. This causes inconsistencies across blackened files because whatever the author chooses, stays.

Both examples below satisfy black:

"""Module docstring."""

import typing
"""Module docstring."""
import typing

My preference would be to enforce a blank line.

Related issue: #450

Metadata

Metadata

Assignees

No one assigned

    Labels

    F: empty linesWasting vertical space efficiently.T: styleWhat do we want Blackened code to look like?

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions