Add newline after module docstrings in preview style (#8283)

Change
```python
"""Test docstring"""
a = 1
```
to
```python
"""Test docstring"""

a = 1
```
in preview style, but don't touch the docstring otherwise.

Do we want to ask black to also format the content of module level
docstrings? Seems inconsistent to me that we change function and class
docstring indentation/contents but not module docstrings.

Fixes https://github.com/astral-sh/ruff/issues/7995
This commit is contained in:
konsti
2023-10-28 03:16:50 +02:00
committed by GitHub
parent fc94857a20
commit af95cbaeef
2 changed files with 28 additions and 12 deletions

View File

@@ -166,6 +166,7 @@ preview = Enabled
"""
Black's `Preview.module_docstring_newlines`
"""
first_stmt_after_module_level_docstring = 1