Fix dangling module comments (#7456)

This commit is contained in:
Micha Reiser 2023-09-17 16:56:41 +02:00 committed by GitHub
parent 959338d39d
commit 26ae0a6e8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 58 additions and 32 deletions

View file

@ -17,6 +17,7 @@ magic-trailing-comma = Respect
```
```py
```
@ -30,6 +31,7 @@ magic-trailing-comma = Respect
```
```py
```
@ -43,6 +45,7 @@ magic-trailing-comma = Respect
```
```py
```

View file

@ -1,31 +1,19 @@
---
source: crates/ruff_python_formatter/tests/fixtures.rs
input_file: crates/ruff_python_formatter/resources/test/fixtures/black/simple_cases/whitespace.py
input_file: crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/module_comment.py
---
## Input
```py
# hehehe >:)a
```
## Black Differences
```diff
--- Black
+++ Ruff
@@ -1 +0,0 @@
-
```
## Ruff Output
## Output
```py
```
## Black Output
```py
# hehehe >:)a
```