-
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.
Avoid fixing D200 for docstrings that end in escapes (#6779)
Appease the fuzzers! Closes #6755.
- Loading branch information
1 parent
749da65
commit 558b56f
Showing
4 changed files
with
61 additions
and
1 deletion.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
def func(): | ||
"""\ | ||
""" | ||
|
||
|
||
def func(): | ||
"""\\ | ||
""" | ||
|
||
|
||
def func(): | ||
"""\ \ | ||
""" |
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
45 changes: 45 additions & 0 deletions
45
crates/ruff/src/rules/pydocstyle/snapshots/ruff__rules__pydocstyle__tests__D200_D200.py.snap
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
source: crates/ruff/src/rules/pydocstyle/mod.rs | ||
--- | ||
D200.py:2:5: D200 One-line docstring should fit on one line | ||
| | ||
1 | def func(): | ||
2 | """\ | ||
| _____^ | ||
3 | | """ | ||
| |_______^ D200 | ||
| | ||
= help: Reformat to one line | ||
|
||
D200.py:7:5: D200 [*] One-line docstring should fit on one line | ||
| | ||
6 | def func(): | ||
7 | """\\ | ||
| _____^ | ||
8 | | """ | ||
| |_______^ D200 | ||
| | ||
= help: Reformat to one line | ||
|
||
ℹ Suggested fix | ||
4 4 | | ||
5 5 | | ||
6 6 | def func(): | ||
7 |- """\\ | ||
8 |- """ | ||
7 |+ """\\""" | ||
9 8 | | ||
10 9 | | ||
11 10 | def func(): | ||
|
||
D200.py:12:5: D200 One-line docstring should fit on one line | ||
| | ||
11 | def func(): | ||
12 | """\ \ | ||
| _____^ | ||
13 | | """ | ||
| |_______^ D200 | ||
| | ||
= help: Reformat to one line | ||
|
||
|