File tree 3 files changed +28
-1
lines changed
crates/ruff_python_formatter
resources/test/fixtures/ruff
3 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,10 @@ def docstring_that_ends_with_quote_and_a_line_break3():
93
93
"""
94
94
95
95
96
+ class ByteDocstring :
97
+ b""" has leading whitespace"""
98
+ first_statement = 1
99
+
96
100
class TabbedIndent :
97
101
def tabbed_indent (self ):
98
102
"""check for correct tabbed formatting
Original file line number Diff line number Diff line change @@ -554,7 +554,6 @@ impl<'a> DocstringStmt<'a> {
554
554
555
555
match value. as_ref ( ) {
556
556
Expr :: StringLiteral ( value) if !value. implicit_concatenated => Some ( DocstringStmt ( stmt) ) ,
557
- Expr :: BytesLiteral ( value) if !value. implicit_concatenated => Some ( DocstringStmt ( stmt) ) ,
558
557
_ => None ,
559
558
}
560
559
}
Original file line number Diff line number Diff line change @@ -99,6 +99,10 @@ def docstring_that_ends_with_quote_and_a_line_break3():
99
99
"""
100
100
101
101
102
+ class ByteDocstring:
103
+ b""" has leading whitespace"""
104
+ first_statement = 1
105
+
102
106
class TabbedIndent:
103
107
def tabbed_indent(self):
104
108
"""check for correct tabbed formatting
@@ -213,6 +217,11 @@ def docstring_that_ends_with_quote_and_a_line_break3():
213
217
"""he said "the news of my death have been greatly exaggerated" """
214
218
215
219
220
+ class ByteDocstring:
221
+ b""" has leading whitespace"""
222
+ first_statement = 1
223
+
224
+
216
225
class TabbedIndent:
217
226
def tabbed_indent(self):
218
227
"""check for correct tabbed formatting
@@ -327,6 +336,11 @@ def docstring_that_ends_with_quote_and_a_line_break3():
327
336
"""he said "the news of my death have been greatly exaggerated" """
328
337
329
338
339
+ class ByteDocstring:
340
+ b""" has leading whitespace"""
341
+ first_statement = 1
342
+
343
+
330
344
class TabbedIndent:
331
345
def tabbed_indent(self):
332
346
"""check for correct tabbed formatting
@@ -441,6 +455,11 @@ def docstring_that_ends_with_quote_and_a_line_break3():
441
455
"""he said "the news of my death have been greatly exaggerated" """
442
456
443
457
458
+ class ByteDocstring:
459
+ b""" has leading whitespace"""
460
+ first_statement = 1
461
+
462
+
444
463
class TabbedIndent:
445
464
def tabbed_indent(self):
446
465
"""check for correct tabbed formatting
@@ -555,6 +574,11 @@ def docstring_that_ends_with_quote_and_a_line_break3():
555
574
"""he said "the news of my death have been greatly exaggerated" """
556
575
557
576
577
+ class ByteDocstring:
578
+ b""" has leading whitespace"""
579
+ first_statement = 1
580
+
581
+
558
582
class TabbedIndent:
559
583
def tabbed_indent(self):
560
584
"""check for correct tabbed formatting
You can’t perform that action at this time.
0 commit comments