---
source: crates/ruff_linter/src/rules/pydocstyle/mod.rs
---
D213 [*] Multi-line docstring summary should start at the second line
   --> D.py:200:5
    |
198 |   @expect('D213: Multi-line docstring summary should start at the second line')
199 |   def multi_line_zero_separating_blanks():
200 | /     """Summary.
201 | |     Description.
202 | |
203 | |     """
    | |_______^
    |
help: Insert line break and indentation after opening quotes
    |
199 | def multi_line_zero_separating_blanks():
    -     """Summary.
200 +     """
201 +     Summary.
202 |     Description.
    |

D213 [*] Multi-line docstring summary should start at the second line
   --> D.py:210:5
    |
208 |   @expect('D213: Multi-line docstring summary should start at the second line')
209 |   def multi_line_two_separating_blanks():
210 | /     """Summary.
211 | |
212 | |
213 | |     Description.
214 | |
215 | |     """
    | |_______^
    |
help: Insert line break and indentation after opening quotes
    |
209 | def multi_line_two_separating_blanks():
    -     """Summary.
210 +     """
211 +     Summary.
212 |
    |

D213 [*] Multi-line docstring summary should start at the second line
   --> D.py:220:5
    |
218 |   @expect('D213: Multi-line docstring summary should start at the second line')
219 |   def multi_line_one_separating_blanks():
220 | /     """Summary.
221 | |
222 | |     Description.
223 | |
224 | |     """
    | |_______^
    |
help: Insert line break and indentation after opening quotes
    |
219 | def multi_line_one_separating_blanks():
    -     """Summary.
220 +     """
221 +     Summary.
222 |
    |

D213 [*] Multi-line docstring summary should start at the second line
   --> D.py:230:5
    |
228 |   @expect('D213: Multi-line docstring summary should start at the second line')
229 |   def asdfsdf():
230 | /     """Summary.
231 | |
232 | | Description.
233 | |
234 | |     """
    | |_______^
    |
help: Insert line break and indentation after opening quotes
    |
229 | def asdfsdf():
    -     """Summary.
230 +     """
231 +     Summary.
232 |
    |

D213 [*] Multi-line docstring summary should start at the second line
   --> D.py:240:5
    |
238 |   @expect('D213: Multi-line docstring summary should start at the second line')
239 |   def asdsdfsdffsdf():
240 | /     """Summary.
241 | |
242 | |     Description.
243 | |
244 | | """
    | |___^
    |
help: Insert line break and indentation after opening quotes
    |
239 | def asdsdfsdffsdf():
    -     """Summary.
240 +     """
241 +     Summary.
242 |
    |

D213 [*] Multi-line docstring summary should start at the second line
   --> D.py:250:5
    |
248 |   @expect('D213: Multi-line docstring summary should start at the second line')
249 |   def asdfsdsdf24():
250 | /     """Summary.
251 | |
252 | |        Description.
253 | |
254 | |     """
    | |_______^
    |
help: Insert line break and indentation after opening quotes
    |
249 | def asdfsdsdf24():
    -     """Summary.
250 +     """
251 +     Summary.
252 |
    |

D213 [*] Multi-line docstring summary should start at the second line
   --> D.py:260:5
    |
258 |   @expect('D213: Multi-line docstring summary should start at the second line')
259 |   def asdfsdsdfsdf24():
260 | /     """Summary.
261 | |
262 | |     Description.
263 | |
264 | |         """
    | |___________^
    |
help: Insert line break and indentation after opening quotes
    |
259 | def asdfsdsdfsdf24():
    -     """Summary.
260 +     """
261 +     Summary.
262 |
    |

D213 [*] Multi-line docstring summary should start at the second line
   --> D.py:270:5
    |
268 |   @expect('D213: Multi-line docstring summary should start at the second line')
269 |   def asdfsdfsdsdsdfsdf24():
270 | /     """Summary.
271 | |
272 | |         Description.
273 | |
274 | |     """
    | |_______^
    |
help: Insert line break and indentation after opening quotes
    |
269 | def asdfsdfsdsdsdfsdf24():
    -     """Summary.
270 +     """
271 +     Summary.
272 |
    |

D213 [*] Multi-line docstring summary should start at the second line
   --> D.py:281:5
    |
279 |   @expect('D213: Multi-line docstring summary should start at the second line')
280 |   def asdfljdf24():
281 | /     """Summary.
282 | |
283 | |     Description."""
    | |___________________^
    |
help: Insert line break and indentation after opening quotes
    |
280 | def asdfljdf24():
    -     """Summary.
281 +     """
282 +     Summary.
283 |
    |

D213 [*] Multi-line docstring summary should start at the second line
   --> D.py:299:5
    |
297 |   @expect('D213: Multi-line docstring summary should start at the second line')
298 |   def multiline():
299 | /     """ Whitespace at the beginning.
300 | |
301 | |     This is the end.
302 | |     """
    | |_______^
    |
help: Insert line break and indentation after opening quotes
    |
298 | def multiline():
    -     """ Whitespace at the beginning.
299 +     """
300 +     Whitespace at the beginning.
301 |
    |

D213 [*] Multi-line docstring summary should start at the second line
   --> D.py:343:5
    |
341 |   @expect('D213: Multi-line docstring summary should start at the second line')
342 |   def exceptions_of_D301():
343 | /     """Exclude some backslashes from D301.
344 | |
345 | |     In particular, line continuations \
346 | |     and unicode literals \u0394 and \N{GREEK CAPITAL LETTER DELTA}.
347 | |     They are considered to be intentionally unescaped.
348 | |     """
    | |_______^
    |
help: Insert line break and indentation after opening quotes
    |
342 | def exceptions_of_D301():
    -     """Exclude some backslashes from D301.
343 +     """
344 +     Exclude some backslashes from D301.
345 |
    |

D213 [*] Multi-line docstring summary should start at the second line
   --> D.py:383:5
    |
381 |   @expect('D213: Multi-line docstring summary should start at the second line')
382 |   def new_209():
383 | /     """First line.
384 | |
385 | |     More lines.
386 | |     """
    | |_______^
387 |       pass
    |
help: Insert line break and indentation after opening quotes
    |
382 | def new_209():
    -     """First line.
383 +     """
384 +     First line.
385 |
    |

D213 [*] Multi-line docstring summary should start at the second line
   --> D.py:392:5
    |
390 |   @expect('D213: Multi-line docstring summary should start at the second line')
391 |   def old_209():
392 | /     """One liner.
393 | |
394 | |     Multi-line comments. OK to have extra blank line
395 | |
396 | |     """
    | |_______^
    |
help: Insert line break and indentation after opening quotes
    |
391 | def old_209():
    -     """One liner.
392 +     """
393 +     One liner.
394 |
    |

D213 [*] Multi-line docstring summary should start at the second line
   --> D.py:438:37
    |
436 |   @expect("D207: Docstring is under-indented")
437 |   @expect('D213: Multi-line docstring summary should start at the second line')
438 |   def docstring_start_in_same_line(): """First Line.
    |  _____________________________________^
439 | |
440 | |     Second Line
441 | |     """
    | |_______^
    |
help: Insert line break and indentation after opening quotes
    |
437 | @expect('D213: Multi-line docstring summary should start at the second line')
    - def docstring_start_in_same_line(): """First Line.
438 + def docstring_start_in_same_line(): """
439 +     First Line.
440 |
    |

D213 [*] Multi-line docstring summary should start at the second line
   --> D.py:450:5
    |
448 |   @expect('D213: Multi-line docstring summary should start at the second line')
449 |   def a_following_valid_function(x=None):
450 | /     """Check for a bug where the previous function caused an assertion.
451 | |
452 | |     The assertion was caused in the next function, so this one is necessary.
453 | |
454 | |     """
    | |_______^
    |
help: Insert line break and indentation after opening quotes
    |
449 | def a_following_valid_function(x=None):
    -     """Check for a bug where the previous function caused an assertion.
450 +     """
451 +     Check for a bug where the previous function caused an assertion.
452 |
    |

D213 [*] Multi-line docstring summary should start at the second line
   --> D.py:526:5
    |
524 |   # parameters as functions for Google / Numpy conventions.
525 |   class Blah:  # noqa: D203,D213
526 | /     """A Blah.
527 | |
528 | |     Parameters
529 | |     ----------
530 | |     x : int
531 | |
532 | |     """
    | |_______^
533 |
534 |       def __init__(self, x):
    |
help: Insert line break and indentation after opening quotes
    |
525 | class Blah:  # noqa: D203,D213
    -     """A Blah.
526 +     """
527 +     A Blah.
528 |
    |

D213 [*] Multi-line docstring summary should start at the second line
   --> D.py:546:5
    |
544 |   def multiline_leading_space():
545 |
546 | /     """Leading space.
547 | |
548 | |     More content.
549 | |     """
    | |_______^
    |
help: Insert line break and indentation after opening quotes
    |
545 |
    -     """Leading space.
546 +     """
547 +     Leading space.
548 |
    |

D213 [*] Multi-line docstring summary should start at the second line
   --> D.py:555:5
    |
553 |   @expect('D213: Multi-line docstring summary should start at the second line')
554 |   def multiline_trailing_space():
555 | /     """Leading space.
556 | |
557 | |     More content.
558 | |     """
    | |_______^
559 |
560 |       pass
    |
help: Insert line break and indentation after opening quotes
    |
554 | def multiline_trailing_space():
    -     """Leading space.
555 +     """
556 +     Leading space.
557 |
    |

D213 [*] Multi-line docstring summary should start at the second line
   --> D.py:568:5
    |
566 |   def multiline_trailing_and_leading_space():
567 |
568 | /     """Trailing and leading space.
569 | |
570 | |     More content.
571 | |     """
    | |_______^
572 |
573 |       pass
    |
help: Insert line break and indentation after opening quotes
    |
567 |
    -     """Trailing and leading space.
568 +     """
569 +     Trailing and leading space.
570 |
    |

D213 [*] Multi-line docstring summary should start at the second line
   --> D.py:588:5
    |
586 |   @expect('D213: Multi-line docstring summary should start at the second line')
587 |   def asdfljdjgf24():
588 | /     """Summary.
589 | |
590 | |     Description.  """
    | |_____________________^
    |
help: Insert line break and indentation after opening quotes
    |
587 | def asdfljdjgf24():
    -     """Summary.
588 +     """
589 +     Summary.
590 |
    |

D213 [*] Multi-line docstring summary should start at the second line
   --> D.py:606:5
    |
604 |   @expect('D212: Multi-line docstring summary should start at the first line')
605 |   def one_liner():
606 | /     r"""Wrong.
607 | |
608 | |     """
    | |_______^
    |
help: Insert line break and indentation after opening quotes
    |
605 | def one_liner():
    -     r"""Wrong.
606 +     r"""
607 +     Wrong.
608 |
    |

D213 [*] Multi-line docstring summary should start at the second line
   --> D.py:615:5
    |
613 |   @expect('D212: Multi-line docstring summary should start at the first line')
614 |   def one_liner():
615 | /     """Wrong."
616 | |
617 | |     """
    | |_______^
    |
help: Insert line break and indentation after opening quotes
    |
614 | def one_liner():
    -     """Wrong."
615 +     """
616 +     Wrong."
617 |
    |

D213 [*] Multi-line docstring summary should start at the second line
   --> D.py:671:5
    |
670 |   def retain_extra_whitespace():
671 | /     """Summary.
672 | |
673 | |         This is overindented
674 | |             And so is this, but it we should preserve the extra space on this line relative
675 | |             to the one before
676 | |     """
    | |_______^
    |
help: Insert line break and indentation after opening quotes
    |
670 | def retain_extra_whitespace():
    -     """Summary.
671 +     """
672 +     Summary.
673 |
    |

D213 [*] Multi-line docstring summary should start at the second line
   --> D.py:680:5
    |
679 |   def retain_extra_whitespace_multiple():
680 | /     """Summary.
681 | |
682 | |         This is overindented
683 | |             And so is this, but it we should preserve the extra space on this line relative
684 | |             to the one before
685 | |         This is also overindented
686 | |             And so is this, but it we should preserve the extra space on this line relative
687 | |             to the one before
688 | |     """
    | |_______^
    |
help: Insert line break and indentation after opening quotes
    |
679 | def retain_extra_whitespace_multiple():
    -     """Summary.
680 +     """
681 +     Summary.
682 |
    |

D213 [*] Multi-line docstring summary should start at the second line
   --> D.py:693:5
    |
692 |   def retain_extra_whitespace_deeper():
693 | /     """Summary.
694 | |
695 | |         This is overindented
696 | |             And so is this, but it we should preserve the extra space on this line relative
697 | |             to the one before
698 | |                 And the relative indent here should be preserved too
699 | |     """
    | |_______^
700 |
701 |   def retain_extra_whitespace_followed_by_same_offset():
    |
help: Insert line break and indentation after opening quotes
    |
692 | def retain_extra_whitespace_deeper():
    -     """Summary.
693 +     """
694 +     Summary.
695 |
    |

D213 [*] Multi-line docstring summary should start at the second line
   --> D.py:702:5
    |
701 |   def retain_extra_whitespace_followed_by_same_offset():
702 | /     """Summary.
703 | |
704 | |         This is overindented
705 | |             And so is this, but it we should preserve the extra space on this line relative
706 | |         This is overindented
707 | |         This is overindented
708 | |     """
    | |_______^
    |
help: Insert line break and indentation after opening quotes
    |
701 | def retain_extra_whitespace_followed_by_same_offset():
    -     """Summary.
702 +     """
703 +     Summary.
704 |
    |

D213 [*] Multi-line docstring summary should start at the second line
   --> D.py:712:5
    |
711 |   def retain_extra_whitespace_not_overindented():
712 | /     """Summary.
713 | |
714 | |     This is not overindented
715 | |         This is overindented, but since one line is not overindented this should not raise
716 | |             And so is this, but it we should preserve the extra space on this line relative
717 | |     """
    | |_______^
    |
help: Insert line break and indentation after opening quotes
    |
711 | def retain_extra_whitespace_not_overindented():
    -     """Summary.
712 +     """
713 +     Summary.
714 |
    |

D213 [*] Multi-line docstring summary should start at the second line
   --> D.py:721:5
    |
720 |   def inconsistent_indent_byte_size():
721 | /     """There's a non-breaking space (2-bytes) after 3 spaces (https://github.com/astral-sh/ruff/issues/9080).
722 | |
723 | |        Returns:
724 | |     """
    | |_______^
    |
help: Insert line break and indentation after opening quotes
    |
720 | def inconsistent_indent_byte_size():
    -     """There's a non-breaking space (2-bytes) after 3 spaces (https://github.com/astral-sh/ruff/issues/9080).
721 +     """
722 +     There's a non-breaking space (2-bytes) after 3 spaces (https://github.com/astral-sh/ruff/issues/9080).
723 |
    |
