-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Insert necessary blank line between class and leading comments
- Loading branch information
1 parent
d1c67f9
commit 8d4cd83
Showing
8 changed files
with
176 additions
and
137 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/class_definition.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# comment | ||
|
||
class Test( | ||
Aaaaaaaaaaaaaaaaa, | ||
Bbbbbbbbbbbbbbbb, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -162,7 +162,7 @@ def f(): | |
```diff | ||
--- Black | ||
+++ Ruff | ||
@@ -1,29 +1,205 @@ | ||
@@ -1,29 +1,206 @@ | ||
+# This file doesn't use the standard decomposition. | ||
+# Decorator syntax test cases are separated by double # comments. | ||
+# Those before the 'output' comment are valid under the old syntax. | ||
|
@@ -172,6 +172,7 @@ def f(): | |
+ | ||
+## | ||
+ | ||
+ | ||
+@decorator | ||
+def f(): | ||
+ ... | ||
|
@@ -209,99 +210,99 @@ def f(): | |
+ ... | ||
+ | ||
+ | ||
+## | ||
+ | ||
## | ||
-@decorator()() | ||
+ | ||
+@decorator(**kwargs) | ||
+def f(): | ||
+ ... | ||
+ | ||
+ | ||
+## | ||
def f(): | ||
... | ||
+ | ||
## | ||
-@(decorator) | ||
+ | ||
+@decorator(*args, **kwargs) | ||
+def f(): | ||
+ ... | ||
+ | ||
+ | ||
+## | ||
def f(): | ||
... | ||
+ | ||
## | ||
-@sequence["decorator"] | ||
+ | ||
+@decorator( | ||
+ *args, | ||
+ **kwargs, | ||
+) | ||
def f(): | ||
... | ||
+ | ||
## | ||
-@decorator[List[str]] | ||
+ | ||
[email protected] | ||
def f(): | ||
... | ||
+ | ||
## | ||
-@var := decorator | ||
+ | ||
[email protected](arg) | ||
+def f(): | ||
+ ... | ||
+ | ||
+ | ||
+## | ||
+ | ||
+ | ||
[email protected] | ||
[email protected](kwarg=0) | ||
+def f(): | ||
+ ... | ||
+ | ||
+ | ||
+## | ||
+ | ||
+ | ||
[email protected](arg) | ||
[email protected](*args) | ||
+def f(): | ||
+ ... | ||
+ | ||
+ | ||
+## | ||
+ | ||
+ | ||
[email protected](kwarg=0) | ||
[email protected](**kwargs) | ||
+def f(): | ||
+ ... | ||
+ | ||
+ | ||
## | ||
-@decorator()() | ||
+## | ||
+ | ||
[email protected](*args) | ||
def f(): | ||
... | ||
+ | ||
## | ||
-@(decorator) | ||
[email protected](*args, **kwargs) | ||
+def f(): | ||
+ ... | ||
+ | ||
[email protected](**kwargs) | ||
def f(): | ||
... | ||
+ | ||
## | ||
-@sequence["decorator"] | ||
+ | ||
[email protected](*args, **kwargs) | ||
def f(): | ||
... | ||
+## | ||
+ | ||
## | ||
-@decorator[List[str]] | ||
+ | ||
[email protected]( | ||
+ *args, | ||
+ **kwargs, | ||
+) | ||
def f(): | ||
... | ||
+def f(): | ||
+ ... | ||
+ | ||
+ | ||
+## | ||
+ | ||
## | ||
-@var := decorator | ||
+ | ||
[email protected] | ||
+def f(): | ||
|
@@ -387,6 +388,7 @@ def f(): | |
## | ||
@decorator | ||
def f(): | ||
... | ||
|
Oops, something went wrong.