ruff/crates/ruff_python_formatter/src
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
..
comments Insert necessary blank line between class and leading comments (#8224) 2023-10-25 20:31:59 -04:00
expression Only omit optional parentheses for starting or ending with parentheses (#8238) 2023-10-26 07:28:58 +01:00
module Attach dangling comments to the comprehension instead of the if or iter nodes (#7693) 2023-09-29 10:45:01 +01:00
other Skip over parentheses when detecting in keyword (#8054) 2023-10-18 19:13:58 -04:00
pattern Move {AnyNodeRef, AstNode} to ruff_python_ast crate root (#8030) 2023-10-18 00:01:18 +00:00
snapshots Remove exception-handler lexing from unused-bound-exception fix (#5851) 2023-07-18 18:27:46 +00:00
statement Add newline after module docstrings in preview style (#8283) 2023-10-28 01:16:50 +00:00
type_param Don't move type param opening parenthesis comment (#8163) 2023-10-24 12:02:27 +00:00
builders.rs Add [format|lint].exclude options (#8000) 2023-10-18 01:15:25 +00:00
cli.rs Add test and basic implementation for formatter preview mode (#8044) 2023-10-26 15:33:26 +00:00
context.rs Implement DerefMut for WithNodeLevel (#6443) 2023-08-11 10:41:48 +00:00
generated.rs Introduce AST nodes for PatternMatchClass arguments (#6881) 2023-08-26 14:45:44 +00:00
lib.rs Use source type to determine parser mode for formatting (#8205) 2023-10-25 19:20:02 +05:30
main.rs Formatter and parser refactoring (#7569) 2023-09-26 15:29:43 +02:00
options.rs Refine warning about incompatible isort settings (#8192) 2023-10-25 08:41:17 +01:00
prelude.rs Accept any Into<AnyNodeRef> as Comments arguments (#5205) 2023-06-20 16:49:21 +00:00
verbatim.rs Fix fmt:off with trailing child comment (#8234) 2023-10-26 01:03:34 +00:00