---
source: crates/ruff_linter/src/rules/pydocstyle/mod.rs
---
sections.py:44:5: D407 [*] Missing dashed underline after section ("Returns")
   |
42 |     """Toggle the gizmo.
43 | 
44 |     Returns
   |     ^^^^^^^ D407
45 |     A value of some sort.
   |
   = help: Add dashed line under "Returns"

ℹ Safe fix
42 42 |     """Toggle the gizmo.
43 43 | 
44 44 |     Returns
   45 |+    -------
45 46 |     A value of some sort.
46 47 | 
47 48 |     """

sections.py:56:5: D407 [*] Missing dashed underline after section ("Returns")
   |
54 |     """Toggle the gizmo.
55 | 
56 |     Returns
   |     ^^^^^^^ D407
57 | 
58 |     """
   |
   = help: Add dashed line under "Returns"

ℹ Safe fix
54 54 |     """Toggle the gizmo.
55 55 | 
56 56 |     Returns
   57 |+    -------
57 58 | 
58 59 |     """
59 60 | 

sections.py:67:5: D407 [*] Missing dashed underline after section ("Returns")
   |
65 |     """Toggle the gizmo.
66 | 
67 |     Returns"""
   |     ^^^^^^^ D407
   |
   = help: Add dashed line under "Returns"

ℹ Safe fix
64 64 | def no_underline_and_no_newline():  # noqa: D416
65 65 |     """Toggle the gizmo.
66 66 | 
67    |-    Returns"""
   67 |+    Returns
   68 |+    -------"""
68 69 | 
69 70 | 
70 71 | @expect(_D213)

sections.py:227:5: D407 [*] Missing dashed underline after section ("Raises")
    |
225 |     ------
226 |     Many many wonderful things.
227 |     Raises:
    |     ^^^^^^ D407
228 |     My attention.
    |
    = help: Add dashed line under "Raises"

ℹ Safe fix
225 225 |     ------
226 226 |     Many many wonderful things.
227 227 |     Raises:
    228 |+    ------
228 229 |     My attention.
229 230 | 
230 231 |     """

sections.py:263:5: D407 [*] Missing dashed underline after section ("Args")
    |
261 |     """Toggle the gizmo.
262 | 
263 |     Args:
    |     ^^^^ D407
264 |         note: A random string.
    |
    = help: Add dashed line under "Args"

ℹ Safe fix
261 261 |     """Toggle the gizmo.
262 262 | 
263 263 |     Args:
    264 |+    ----
264 265 |         note: A random string.
265 266 | 
266 267 |     Returns:

sections.py:266:5: D407 [*] Missing dashed underline after section ("Returns")
    |
264 |         note: A random string.
265 | 
266 |     Returns:
    |     ^^^^^^^ D407
267 | 
268 |     Raises:
    |
    = help: Add dashed line under "Returns"

ℹ Safe fix
264 264 |         note: A random string.
265 265 | 
266 266 |     Returns:
    267 |+    -------
267 268 | 
268 269 |     Raises:
269 270 |         RandomError: A random error that occurs randomly.

sections.py:268:5: D407 [*] Missing dashed underline after section ("Raises")
    |
266 |     Returns:
267 | 
268 |     Raises:
    |     ^^^^^^ D407
269 |         RandomError: A random error that occurs randomly.
    |
    = help: Add dashed line under "Raises"

ℹ Safe fix
266 266 |     Returns:
267 267 | 
268 268 |     Raises:
    269 |+    ------
269 270 |         RandomError: A random error that occurs randomly.
270 271 | 
271 272 |     """

sections.py:280:5: D407 [*] Missing dashed underline after section ("Args")
    |
278 |     """Toggle the gizmo.
279 | 
280 |     Args
    |     ^^^^ D407
281 |         note: A random string.
    |
    = help: Add dashed line under "Args"

ℹ Safe fix
278 278 |     """Toggle the gizmo.
279 279 | 
280 280 |     Args
    281 |+    ----
281 282 |         note: A random string.
282 283 | 
283 284 |     """

sections.py:297:9: D407 [*] Missing dashed underline after section ("Args")
    |
295 |         Will this work when referencing x?
296 | 
297 |         Args:
    |         ^^^^ D407
298 |             x: Test something
299 | that is broken.
    |
    = help: Add dashed line under "Args"

ℹ Safe fix
295 295 |         Will this work when referencing x?
296 296 | 
297 297 |         Args:
    298 |+        ----
298 299 |             x: Test something
299 300 | that is broken.
300 301 | 

sections.py:312:5: D407 [*] Missing dashed underline after section ("Args")
    |
310 |     """Toggle the gizmo.
311 | 
312 |     Args:
    |     ^^^^ D407
313 |         x (int): The greatest integer.
    |
    = help: Add dashed line under "Args"

ℹ Safe fix
310 310 |     """Toggle the gizmo.
311 311 | 
312 312 |     Args:
    313 |+    ----
313 314 |         x (int): The greatest integer.
314 315 | 
315 316 |     """

sections.py:324:9: D407 [*] Missing dashed underline after section ("Args")
    |
322 |         """Test a valid args section.
323 | 
324 |         Args:
    |         ^^^^ D407
325 |             test: A parameter.
326 |             another_test: Another parameter.
    |
    = help: Add dashed line under "Args"

ℹ Safe fix
322 322 |         """Test a valid args section.
323 323 | 
324 324 |         Args:
    325 |+        ----
325 326 |             test: A parameter.
326 327 |             another_test: Another parameter.
327 328 | 

sections.py:336:9: D407 [*] Missing dashed underline after section ("Args")
    |
334 |         """Test a valid args section.
335 | 
336 |         Args:
    |         ^^^^ D407
337 |             x: Another parameter.
    |
    = help: Add dashed line under "Args"

ℹ Safe fix
334 334 |         """Test a valid args section.
335 335 | 
336 336 |         Args:
    337 |+        ----
337 338 |             x: Another parameter.
338 339 | 
339 340 |         """

sections.py:348:9: D407 [*] Missing dashed underline after section ("Args")
    |
346 |         """Test a valid args section.
347 | 
348 |         Args:
    |         ^^^^ D407
349 |             x: Another parameter. The parameter below is missing description.
350 |             y:
    |
    = help: Add dashed line under "Args"

ℹ Safe fix
346 346 |         """Test a valid args section.
347 347 | 
348 348 |         Args:
    349 |+        ----
349 350 |             x: Another parameter. The parameter below is missing description.
350 351 |             y:
351 352 | 

sections.py:361:9: D407 [*] Missing dashed underline after section ("Args")
    |
359 |         """Test a valid args section.
360 | 
361 |         Args:
    |         ^^^^ D407
362 |             x: Another parameter.
    |
    = help: Add dashed line under "Args"

ℹ Safe fix
359 359 |         """Test a valid args section.
360 360 | 
361 361 |         Args:
    362 |+        ----
362 363 |             x: Another parameter.
363 364 | 
364 365 |         """

sections.py:373:9: D407 [*] Missing dashed underline after section ("Args")
    |
371 |         """Test a valid args section.
372 | 
373 |         Args:
    |         ^^^^ D407
374 |             a:
    |
    = help: Add dashed line under "Args"

ℹ Safe fix
371 371 |         """Test a valid args section.
372 372 | 
373 373 |         Args:
    374 |+        ----
374 375 |             a:
375 376 | 
376 377 |         """

sections.py:382:9: D407 [*] Missing dashed underline after section ("Args")
    |
380 |         """Do stuff.
381 | 
382 |         Args:
    |         ^^^^ D407
383 |             skip (:attr:`.Skip`):
384 |                 Lorem ipsum dolor sit amet, consectetur adipiscing elit.
    |
    = help: Add dashed line under "Args"

ℹ Safe fix
380 380 |         """Do stuff.
381 381 | 
382 382 |         Args:
    383 |+        ----
383 384 |             skip (:attr:`.Skip`):
384 385 |                 Lorem ipsum dolor sit amet, consectetur adipiscing elit.
385 386 |                 Etiam at tellus a tellus faucibus maximus. Curabitur tellus

sections.py:503:9: D407 [*] Missing dashed underline after section ("Args")
    |
501 | Testing this incorrectly indented docstring.
502 | 
503 |         Args:
    |         ^^^^ D407
504 |             x: Test argument.
    |
    = help: Add dashed line under "Args"

ℹ Safe fix
501 501 | Testing this incorrectly indented docstring.
502 502 | 
503 503 |         Args:
    504 |+        ----
504 505 |             x: Test argument.
505 506 | 
506 507 |         """

sections.py:522:5: D407 [*] Missing dashed underline after section ("Parameters")
    |
521 |     Parameters
522 |     ==========
    |     ^^^^^^^^^^ D407
523 |     """
    |
    = help: Add dashed line under "Parameters"

ℹ Safe fix
519 519 |     """Equal length equals should be replaced with dashes.
520 520 | 
521 521 |     Parameters
522     |-    ==========
    522 |+    ----------
523 523 |     """
524 524 | 
525 525 | 

sections.py:530:5: D407 [*] Missing dashed underline after section ("Parameters")
    |
529 |     Parameters
530 |     ===========
    |     ^^^^^^^^^^^ D407
531 |     """
    |
    = help: Add dashed line under "Parameters"

ℹ Safe fix
527 527 |     """Here, the length of equals is not the same.
528 528 | 
529 529 |     Parameters
530     |-    ===========
    530 |+    ----------
531 531 |     """
532 532 | 
533 533 | 

sections.py:550:5: D407 [*] Missing dashed underline after section ("Args")
    |
548 |     """Below, `returns:` should _not_ be considered a section header.
549 | 
550 |     Args:
    |     ^^^^ D407
551 |         Here's a note.
    |
    = help: Add dashed line under "Args"

ℹ Safe fix
548 548 |     """Below, `returns:` should _not_ be considered a section header.
549 549 | 
550 550 |     Args:
    551 |+    ----
551 552 |         Here's a note.
552 553 | 
553 554 |         returns:

sections.py:560:5: D407 [*] Missing dashed underline after section ("Args")
    |
558 |     """Below, `Returns:` should be considered a section header.
559 | 
560 |     Args:
    |     ^^^^ D407
561 |         Here's a note.
    |
    = help: Add dashed line under "Args"

ℹ Safe fix
558 558 |     """Below, `Returns:` should be considered a section header.
559 559 | 
560 560 |     Args:
    561 |+    ----
561 562 |         Here's a note.
562 563 | 
563 564 |         Returns:

sections.py:563:9: D407 [*] Missing dashed underline after section ("Returns")
    |
561 |         Here's a note.
562 | 
563 |         Returns:
    |         ^^^^^^^ D407
564 |     """
    |
    = help: Add dashed line under "Returns"

ℹ Safe fix
561 561 |         Here's a note.
562 562 | 
563 563 |         Returns:
    564 |+    -------
564 565 |     """
565 566 | 
566 567 | 

sections.py:602:4: D407 [*] Missing dashed underline after section ("Parameters")
    |
600 |    """Test that lower case subsection header is valid even if it is of a different kind.
601 | 
602 |    Parameters
    |    ^^^^^^^^^^ D407
603 |    -‐-----------------
604 |    returns:
    |
    = help: Add dashed line under "Parameters"

ℹ Safe fix
600 600 |    """Test that lower case subsection header is valid even if it is of a different kind.
601 601 | 
602 602 |    Parameters
    603 |+   ----------
603 604 |    -‐-----------------
604 605 |    returns:
605 606 |        some value
