ruff/crates/ruff_python_formatter/src/statement
konsti af95cbaeef
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
2023-10-28 01:16:50 +00:00
..
clause.rs Add test and basic implementation for formatter preview mode (#8044) 2023-10-26 15:33:26 +00:00
mod.rs Support fmt: skip on compound statements (#6593) 2023-08-17 06:05:41 +00:00
stmt_ann_assign.rs Avoid introducing new parentheses in annotated assignments (#8233) 2023-10-25 22:51:50 -04:00
stmt_assert.rs Introduce Token element (#7048) 2023-09-02 10:05:47 +02:00
stmt_assign.rs Introduce Token element (#7048) 2023-09-02 10:05:47 +02:00
stmt_aug_assign.rs Introduce Token element (#7048) 2023-09-02 10:05:47 +02:00
stmt_break.rs Introduce Token element (#7048) 2023-09-02 10:05:47 +02:00
stmt_class_def.rs Insert necessary blank line between class and leading comments (#8224) 2023-10-25 20:31:59 -04:00
stmt_continue.rs Introduce Token element (#7048) 2023-09-02 10:05:47 +02:00
stmt_delete.rs Introduce Token element (#7048) 2023-09-02 10:05:47 +02:00
stmt_expr.rs Use the formatter prelude in more files (#6882) 2023-08-25 16:51:07 -04:00
stmt_for.rs Introduce Token element (#7048) 2023-09-02 10:05:47 +02:00
stmt_function_def.rs Insert necessary blank line between class and leading comments (#8224) 2023-10-25 20:31:59 -04:00
stmt_global.rs Move {AnyNodeRef, AstNode} to ruff_python_ast crate root (#8030) 2023-10-18 00:01:18 +00:00
stmt_if.rs Move {AnyNodeRef, AstNode} to ruff_python_ast crate root (#8030) 2023-10-18 00:01:18 +00:00
stmt_import.rs Introduce Token element (#7048) 2023-09-02 10:05:47 +02:00
stmt_import_from.rs Move {AnyNodeRef, AstNode} to ruff_python_ast crate root (#8030) 2023-10-18 00:01:18 +00:00
stmt_ipy_escape_command.rs Memoize text width (#6552) 2023-09-06 07:10:13 +00:00
stmt_match.rs Introduce Token element (#7048) 2023-09-02 10:05:47 +02:00
stmt_nonlocal.rs Move {AnyNodeRef, AstNode} to ruff_python_ast crate root (#8030) 2023-10-18 00:01:18 +00:00
stmt_pass.rs Introduce Token element (#7048) 2023-09-02 10:05:47 +02:00
stmt_raise.rs Introduce Token element (#7048) 2023-09-02 10:05:47 +02:00
stmt_return.rs Introduce Token element (#7048) 2023-09-02 10:05:47 +02:00
stmt_try.rs Introduce Token element (#7048) 2023-09-02 10:05:47 +02:00
stmt_type_alias.rs Introduce Token element (#7048) 2023-09-02 10:05:47 +02:00
stmt_while.rs Move {AnyNodeRef, AstNode} to ruff_python_ast crate root (#8030) 2023-10-18 00:01:18 +00:00
stmt_with.rs Move {AnyNodeRef, AstNode} to ruff_python_ast crate root (#8030) 2023-10-18 00:01:18 +00:00
suite.rs Add newline after module docstrings in preview style (#8283) 2023-10-28 01:16:50 +00:00