Skip to content

Add newline after module docstrings (module_docstring_newlines) #7995

Closed
@DanielNoord

Description

"""Test docstring"""
a = 1

On the playground this does not currently get a newline added with the format option turned on.

Recently a PR of mine got merged to black to include a newline after the module docstring:
psf/black#3932
Most credits should go to others though for that PR as I mostly copied and rebased code.

It's still in the preview style but got generally favourable responses when initially proposed a couple of year ago. Since nobody has really objected to it during its previous iterations I expect it to be part of the default style some day.

Would ruff be open to to include this change to ruff format as well?

EDIT: Oh, and congrats on the 0.1.0 release 🎉

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

formatterRelated to the formatterpreviewRelated to preview mode features

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions