Skip to content

Commit 620bd98

Browse files
committed
wip: these are wrong, but committing for now
1 parent 3b1e77a commit 620bd98

3 files changed

+51
-54
lines changed

crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D207_D.py.snap

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
---
22
source: crates/ruff_linter/src/rules/pydocstyle/mod.rs
3-
snapshot_kind: text
43
---
54
D.py:232:1: D207 [*] Docstring is under-indented
65
|
76
230 | """Summary.
8-
231 |
7+
231 |
8+
| ^ D207
99
232 | Description.
10-
| D207
11-
233 |
10+
233 |
1211
234 | """
1312
|
1413
= help: Increase indentation
@@ -26,9 +25,9 @@ D.py:232:1: D207 [*] Docstring is under-indented
2625
D.py:244:1: D207 [*] Docstring is under-indented
2726
|
2827
242 | Description.
29-
243 |
28+
243 |
29+
| ^ D207
3030
244 | """
31-
| D207
3231
|
3332
= help: Increase indentation
3433

@@ -45,9 +44,9 @@ D.py:244:1: D207 [*] Docstring is under-indented
4544
D.py:440:1: D207 [*] Docstring is under-indented
4645
|
4746
438 | def docstring_start_in_same_line(): """First Line.
48-
439 |
47+
439 |
48+
| ^ D207
4949
440 | Second Line
50-
| D207
5150
441 | """
5251
|
5352
= help: Increase indentation
@@ -65,8 +64,8 @@ D.py:440:1: D207 [*] Docstring is under-indented
6564
D.py:441:1: D207 [*] Docstring is under-indented
6665
|
6766
440 | Second Line
67+
| ^ D207
6868
441 | """
69-
| D207
7069
|
7170
= help: Increase indentation
7271

crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D208_D.py.snap

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
---
22
source: crates/ruff_linter/src/rules/pydocstyle/mod.rs
3-
snapshot_kind: text
43
---
54
D.py:252:1: D208 [*] Docstring is over-indented
65
|
76
250 | """Summary.
8-
251 |
7+
251 |
8+
| ^ D208
99
252 | Description.
10-
| D208
11-
253 |
10+
253 |
1211
254 | """
1312
|
1413
= help: Remove over-indentation
@@ -26,9 +25,9 @@ D.py:252:1: D208 [*] Docstring is over-indented
2625
D.py:264:1: D208 [*] Docstring is over-indented
2726
|
2827
262 | Description.
29-
263 |
28+
263 |
29+
| ^ D208
3030
264 | """
31-
| D208
3231
|
3332
= help: Remove over-indentation
3433

@@ -45,10 +44,10 @@ D.py:264:1: D208 [*] Docstring is over-indented
4544
D.py:272:1: D208 [*] Docstring is over-indented
4645
|
4746
270 | """Summary.
48-
271 |
47+
271 |
48+
| ^ D208
4949
272 | Description.
50-
| D208
51-
273 |
50+
273 |
5251
274 | """
5352
|
5453
= help: Remove over-indentation
@@ -66,9 +65,9 @@ D.py:272:1: D208 [*] Docstring is over-indented
6665
D.py:673:1: D208 [*] Docstring is over-indented
6766
|
6867
671 | """Summary.
69-
672 |
68+
672 |
69+
| ^ D208
7070
673 | This is overindented
71-
| D208
7271
674 | And so is this, but it we should preserve the extra space on this line relative
7372
675 | to the one before
7473
|
@@ -87,8 +86,8 @@ D.py:673:1: D208 [*] Docstring is over-indented
8786
D.py:674:1: D208 [*] Docstring is over-indented
8887
|
8988
673 | This is overindented
89+
| ^ D208
9090
674 | And so is this, but it we should preserve the extra space on this line relative
91-
| D208
9291
675 | to the one before
9392
676 | """
9493
|
@@ -108,8 +107,8 @@ D.py:675:1: D208 [*] Docstring is over-indented
108107
|
109108
673 | This is overindented
110109
674 | And so is this, but it we should preserve the extra space on this line relative
110+
| ^ D208
111111
675 | to the one before
112-
| D208
113112
676 | """
114113
|
115114
= help: Remove over-indentation
@@ -127,9 +126,9 @@ D.py:675:1: D208 [*] Docstring is over-indented
127126
D.py:682:1: D208 [*] Docstring is over-indented
128127
|
129128
680 | """Summary.
130-
681 |
129+
681 |
130+
| ^ D208
131131
682 | This is overindented
132-
| D208
133132
683 | And so is this, but it we should preserve the extra space on this line relative
134133
684 | to the one before
135134
|
@@ -148,8 +147,8 @@ D.py:682:1: D208 [*] Docstring is over-indented
148147
D.py:683:1: D208 [*] Docstring is over-indented
149148
|
150149
682 | This is overindented
150+
| ^ D208
151151
683 | And so is this, but it we should preserve the extra space on this line relative
152-
| D208
153152
684 | to the one before
154153
685 | This is also overindented
155154
|
@@ -169,8 +168,8 @@ D.py:684:1: D208 [*] Docstring is over-indented
169168
|
170169
682 | This is overindented
171170
683 | And so is this, but it we should preserve the extra space on this line relative
171+
| ^ D208
172172
684 | to the one before
173-
| D208
174173
685 | This is also overindented
175174
686 | And so is this, but it we should preserve the extra space on this line relative
176175
|
@@ -190,8 +189,8 @@ D.py:685:1: D208 [*] Docstring is over-indented
190189
|
191190
683 | And so is this, but it we should preserve the extra space on this line relative
192191
684 | to the one before
192+
| ^ D208
193193
685 | This is also overindented
194-
| D208
195194
686 | And so is this, but it we should preserve the extra space on this line relative
196195
687 | to the one before
197196
|
@@ -211,8 +210,8 @@ D.py:686:1: D208 [*] Docstring is over-indented
211210
|
212211
684 | to the one before
213212
685 | This is also overindented
213+
| ^ D208
214214
686 | And so is this, but it we should preserve the extra space on this line relative
215-
| D208
216215
687 | to the one before
217216
688 | """
218217
|
@@ -232,8 +231,8 @@ D.py:687:1: D208 [*] Docstring is over-indented
232231
|
233232
685 | This is also overindented
234233
686 | And so is this, but it we should preserve the extra space on this line relative
234+
| ^ D208
235235
687 | to the one before
236-
| D208
237236
688 | """
238237
|
239238
= help: Remove over-indentation
@@ -251,9 +250,9 @@ D.py:687:1: D208 [*] Docstring is over-indented
251250
D.py:695:1: D208 [*] Docstring is over-indented
252251
|
253252
693 | """Summary.
254-
694 |
253+
694 |
254+
| ^ D208
255255
695 | This is overindented
256-
| D208
257256
696 | And so is this, but it we should preserve the extra space on this line relative
258257
697 | to the one before
259258
|
@@ -272,8 +271,8 @@ D.py:695:1: D208 [*] Docstring is over-indented
272271
D.py:696:1: D208 [*] Docstring is over-indented
273272
|
274273
695 | This is overindented
274+
| ^ D208
275275
696 | And so is this, but it we should preserve the extra space on this line relative
276-
| D208
277276
697 | to the one before
278277
698 | And the relative indent here should be preserved too
279278
|
@@ -293,8 +292,8 @@ D.py:697:1: D208 [*] Docstring is over-indented
293292
|
294293
695 | This is overindented
295294
696 | And so is this, but it we should preserve the extra space on this line relative
295+
| ^ D208
296296
697 | to the one before
297-
| D208
298297
698 | And the relative indent here should be preserved too
299298
699 | """
300299
|
@@ -314,8 +313,8 @@ D.py:698:1: D208 [*] Docstring is over-indented
314313
|
315314
696 | And so is this, but it we should preserve the extra space on this line relative
316315
697 | to the one before
316+
| ^ D208
317317
698 | And the relative indent here should be preserved too
318-
| D208
319318
699 | """
320319
|
321320
= help: Remove over-indentation
@@ -333,9 +332,9 @@ D.py:698:1: D208 [*] Docstring is over-indented
333332
D.py:704:1: D208 [*] Docstring is over-indented
334333
|
335334
702 | """Summary.
336-
703 |
335+
703 |
336+
| ^ D208
337337
704 | This is overindented
338-
| D208
339338
705 | And so is this, but it we should preserve the extra space on this line relative
340339
706 | This is overindented
341340
|
@@ -354,8 +353,8 @@ D.py:704:1: D208 [*] Docstring is over-indented
354353
D.py:705:1: D208 [*] Docstring is over-indented
355354
|
356355
704 | This is overindented
356+
| ^ D208
357357
705 | And so is this, but it we should preserve the extra space on this line relative
358-
| D208
359358
706 | This is overindented
360359
707 | This is overindented
361360
|
@@ -375,8 +374,8 @@ D.py:706:1: D208 [*] Docstring is over-indented
375374
|
376375
704 | This is overindented
377376
705 | And so is this, but it we should preserve the extra space on this line relative
377+
| ^ D208
378378
706 | This is overindented
379-
| D208
380379
707 | This is overindented
381380
708 | """
382381
|
@@ -396,8 +395,8 @@ D.py:707:1: D208 [*] Docstring is over-indented
396395
|
397396
705 | And so is this, but it we should preserve the extra space on this line relative
398397
706 | This is overindented
398+
| ^ D208
399399
707 | This is overindented
400-
| D208
401400
708 | """
402401
|
403402
= help: Remove over-indentation
@@ -415,9 +414,9 @@ D.py:707:1: D208 [*] Docstring is over-indented
415414
D.py:723:1: D208 [*] Docstring is over-indented
416415
|
417416
721 | """There's a non-breaking space (2-bytes) after 3 spaces (https://github.com/astral-sh/ruff/issues/9080).
418-
722 |
417+
722 |
418+
| ^ D208
419419
723 |     Returns:
420-
| D208
421420
724 | """
422421
|
423422
= help: Remove over-indentation

crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D208_D208.py.snap

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
---
22
source: crates/ruff_linter/src/rules/pydocstyle/mod.rs
3-
snapshot_kind: text
43
---
54
D208.py:2:1: D208 [*] Docstring is over-indented
65
|
76
1 | """
7+
| ^ D208
88
2 | Author
9-
| D208
109
3 | """
1110
|
1211
= help: Remove over-indentation
@@ -23,8 +22,8 @@ D208.py:8:1: D208 [*] Docstring is over-indented
2322
|
2423
6 | class Platform:
2524
7 | """ Remove sampler
25+
| ^ D208
2626
8 | Args:
27-
| D208
2827
9 |     Returns:
2928
10 | """
3029
|
@@ -44,8 +43,8 @@ D208.py:9:1: D208 [*] Docstring is over-indented
4443
|
4544
7 | """ Remove sampler
4645
8 | Args:
46+
| ^ D208
4747
9 |     Returns:
48-
| D208
4948
10 | """
5049
|
5150
= help: Remove over-indentation
@@ -64,8 +63,8 @@ D208.py:10:1: D208 [*] Docstring is over-indented
6463
|
6564
8 | Args:
6665
9 |     Returns:
66+
| ^ D208
6767
10 | """
68-
| D208
6968
|
7069
= help: Remove over-indentation
7170

@@ -83,8 +82,8 @@ D208.py:24:1: D208 [*] Docstring is over-indented
8382
|
8483
22 | Args:
8584
23 | Returns:
85+
| ^ D208
8686
24 | """
87-
| D208
8887
|
8988
= help: Remove over-indentation
9089

@@ -102,8 +101,8 @@ D208.py:29:1: D208 [*] Docstring is over-indented
102101
|
103102
27 | class Platform:
104103
28 | """All lines are over indented including the last containing the closing quotes
104+
| ^ D208
105105
29 | Args:
106-
| D208
107106
30 | Returns:
108107
31 | """
109108
|
@@ -123,8 +122,8 @@ D208.py:30:1: D208 [*] Docstring is over-indented
123122
|
124123
28 | """All lines are over indented including the last containing the closing quotes
125124
29 | Args:
125+
| ^ D208
126126
30 | Returns:
127-
| D208
128127
31 | """
129128
|
130129
= help: Remove over-indentation
@@ -143,9 +142,9 @@ D208.py:31:1: D208 [*] Docstring is over-indented
143142
|
144143
29 | Args:
145144
30 | Returns:
145+
| ^ D208
146146
31 | """
147-
| D208
148-
32 |
147+
32 |
149148
33 | class Platform:
150149
|
151150
= help: Remove over-indentation
@@ -164,8 +163,8 @@ D208.py:35:1: D208 [*] Docstring is over-indented
164163
|
165164
33 | class Platform:
166165
34 | """All lines are over indented including the last
166+
| ^ D208
167167
35 | Args:
168-
| D208
169168
36 | Returns"""
170169
|
171170
= help: Remove over-indentation
@@ -184,9 +183,9 @@ D208.py:36:1: D208 [*] Docstring is over-indented
184183
|
185184
34 | """All lines are over indented including the last
186185
35 | Args:
186+
| ^ D208
187187
36 | Returns"""
188-
| D208
189-
37 |
188+
37 |
190189
38 | # OK: This doesn't get flagged because it is accepted when the closing quotes are on a separate line (see next test). Raises D209
191190
|
192191
= help: Remove over-indentation

0 commit comments

Comments
 (0)