---
source: crates/ruff_linter/src/rules/pydocstyle/mod.rs
---
D.py:355:5: D415 [*] First line should end with a period, question mark, or exclamation point
    |
353 |         "or exclamation point (not 'y')")
354 | def lwnlkjl():
355 |     """Summary"""
    |     ^^^^^^^^^^^^^ D415
    |
    = help: Add closing punctuation

ℹ Unsafe fix
352 352 | @expect("D415: First line should end with a period, question mark, "
353 353 |         "or exclamation point (not 'y')")
354 354 | def lwnlkjl():
355     |-    """Summary"""
    355 |+    """Summary."""
356 356 | 
357 357 | 
358 358 | @expect("D401: First line should be in imperative mood "

D.py:406:25: D415 [*] First line should end with a period, question mark, or exclamation point
    |
404 | @expect("D415: First line should end with a period, question mark,"
405 |         " or exclamation point (not 'r')")
406 | def oneliner_withdoc(): """One liner"""
    |                         ^^^^^^^^^^^^^^^ D415
    |
    = help: Add closing punctuation

ℹ Unsafe fix
403 403 | @expect("D400: First line should end with a period (not 'r')")
404 404 | @expect("D415: First line should end with a period, question mark,"
405 405 |         " or exclamation point (not 'r')")
406     |-def oneliner_withdoc(): """One liner"""
    406 |+def oneliner_withdoc(): """One liner."""
407 407 | 
408 408 | 
409 409 | def ignored_decorator(func):   # noqa: D400,D401,D415

D.py:410:5: D415 [*] First line should end with a period, question mark, or exclamation point
    |
409 | def ignored_decorator(func):   # noqa: D400,D401,D415
410 |     """Runs something"""
    |     ^^^^^^^^^^^^^^^^^^^^ D415
411 |     func()
412 |     pass
    |
    = help: Add closing punctuation

ℹ Unsafe fix
407 407 | 
408 408 | 
409 409 | def ignored_decorator(func):   # noqa: D400,D401,D415
410     |-    """Runs something"""
    410 |+    """Runs something."""
411 411 |     func()
412 412 |     pass
413 413 | 

D.py:416:5: D415 [*] First line should end with a period, question mark, or exclamation point
    |
415 | def decorator_for_test(func):   # noqa: D400,D401,D415
416 |     """Runs something"""
    |     ^^^^^^^^^^^^^^^^^^^^ D415
417 |     func()
418 |     pass
    |
    = help: Add closing punctuation

ℹ Unsafe fix
413 413 | 
414 414 | 
415 415 | def decorator_for_test(func):   # noqa: D400,D401,D415
416     |-    """Runs something"""
    416 |+    """Runs something."""
417 417 |     func()
418 418 |     pass
419 419 | 

D.py:422:35: D415 [*] First line should end with a period, question mark, or exclamation point
    |
421 | @ignored_decorator
422 | def oneliner_ignored_decorator(): """One liner"""
    |                                   ^^^^^^^^^^^^^^^ D415
    |
    = help: Add closing punctuation

ℹ Unsafe fix
419 419 | 
420 420 | 
421 421 | @ignored_decorator
422     |-def oneliner_ignored_decorator(): """One liner"""
    422 |+def oneliner_ignored_decorator(): """One liner."""
423 423 | 
424 424 | 
425 425 | @decorator_for_test

D.py:429:49: D415 [*] First line should end with a period, question mark, or exclamation point
    |
427 | @expect("D415: First line should end with a period, question mark,"
428 |         " or exclamation point (not 'r')")
429 | def oneliner_with_decorator_expecting_errors(): """One liner"""
    |                                                 ^^^^^^^^^^^^^^^ D415
    |
    = help: Add closing punctuation

ℹ Unsafe fix
426 426 | @expect("D400: First line should end with a period (not 'r')")
427 427 | @expect("D415: First line should end with a period, question mark,"
428 428 |         " or exclamation point (not 'r')")
429     |-def oneliner_with_decorator_expecting_errors(): """One liner"""
    429 |+def oneliner_with_decorator_expecting_errors(): """One liner."""
430 430 | 
431 431 | 
432 432 | @decorator_for_test

D.py:470:5: D415 [*] First line should end with a period, question mark, or exclamation point
    |
468 |         "or exclamation point (not 'g')")
469 | def docstring_bad():
470 |     """Runs something"""
    |     ^^^^^^^^^^^^^^^^^^^^ D415
471 |     pass
    |
    = help: Add closing punctuation

ℹ Unsafe fix
467 467 | @expect("D415: First line should end with a period, question mark, "
468 468 |         "or exclamation point (not 'g')")
469 469 | def docstring_bad():
470     |-    """Runs something"""
    470 |+    """Runs something."""
471 471 |     pass
472 472 | 
473 473 | 

D.py:475:5: D415 [*] First line should end with a period, question mark, or exclamation point
    |
474 | def docstring_bad_ignore_all():  # noqa
475 |     """Runs something"""
    |     ^^^^^^^^^^^^^^^^^^^^ D415
476 |     pass
    |
    = help: Add closing punctuation

ℹ Unsafe fix
472 472 | 
473 473 | 
474 474 | def docstring_bad_ignore_all():  # noqa
475     |-    """Runs something"""
    475 |+    """Runs something."""
476 476 |     pass
477 477 | 
478 478 | 

D.py:480:5: D415 [*] First line should end with a period, question mark, or exclamation point
    |
479 | def docstring_bad_ignore_one():  # noqa: D400,D401,D415
480 |     """Runs something"""
    |     ^^^^^^^^^^^^^^^^^^^^ D415
481 |     pass
    |
    = help: Add closing punctuation

ℹ Unsafe fix
477 477 | 
478 478 | 
479 479 | def docstring_bad_ignore_one():  # noqa: D400,D401,D415
480     |-    """Runs something"""
    480 |+    """Runs something."""
481 481 |     pass
482 482 | 
483 483 | 

D.py:487:5: D415 [*] First line should end with a period, question mark, or exclamation point
    |
485 |         "(perhaps 'Run', not 'Runs')")
486 | def docstring_ignore_some_violations_but_catch_D401():  # noqa: E501,D400,D415
487 |     """Runs something"""
    |     ^^^^^^^^^^^^^^^^^^^^ D415
488 |     pass
    |
    = help: Add closing punctuation

ℹ Unsafe fix
484 484 | @expect("D401: First line should be in imperative mood "
485 485 |         "(perhaps 'Run', not 'Runs')")
486 486 | def docstring_ignore_some_violations_but_catch_D401():  # noqa: E501,D400,D415
487     |-    """Runs something"""
    487 |+    """Runs something."""
488 488 |     pass
489 489 | 
490 490 | 

D.py:520:5: D415 [*] First line should end with a period, question mark, or exclamation point
    |
518 |         "or exclamation point (not 'g')")
519 | def bad_google_string():  # noqa: D400
520 |     """Test a valid something"""
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ D415
    |
    = help: Add closing punctuation

ℹ Unsafe fix
517 517 | @expect("D415: First line should end with a period, question mark, "
518 518 |         "or exclamation point (not 'g')")
519 519 | def bad_google_string():  # noqa: D400
520     |-    """Test a valid something"""
    520 |+    """Test a valid something."""
521 521 | 
522 522 | 
523 523 | # This is reproducing a bug where AttributeError is raised when parsing class

D.py:581:5: D415 [*] First line should end with a period, question mark, or exclamation point
    |
579 |         "or exclamation point (not '\"')")
580 | def endswith_quote():
581 |     """Whitespace at the end, but also a quote" """
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ D415
    |
    = help: Add closing punctuation

ℹ Unsafe fix
578 578 | @expect("D415: First line should end with a period, question mark, "
579 579 |         "or exclamation point (not '\"')")
580 580 | def endswith_quote():
581     |-    """Whitespace at the end, but also a quote" """
    581 |+    """Whitespace at the end, but also a quote". """
582 582 | 
583 583 | 
584 584 | @expect('D209: Multi-line docstring closing quotes should be on a separate '

D.py:615:5: D415 [*] First line should end with a period, question mark, or exclamation point
    |
613 |   @expect('D212: Multi-line docstring summary should start at the first line')
614 |   def one_liner():
615 |       """Wrong."
    |  _____^
616 | | 
617 | |     """
    | |_______^ D415
    |
    = help: Add closing punctuation

ℹ Unsafe fix
612 612 |         '(found 3)')
613 613 | @expect('D212: Multi-line docstring summary should start at the first line')
614 614 | def one_liner():
615     |-    """Wrong."
    615 |+    """Wrong.".
616 616 | 
617 617 |     """
618 618 | 

D.py:639:17: D415 [*] First line should end with a period, question mark, or exclamation point
    |
639 | class SameLine: """This is a docstring on the same line"""
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ D415
640 | 
641 | def same_line(): """This is a docstring on the same line"""
    |
    = help: Add closing punctuation

ℹ Unsafe fix
636 636 |     """ This is a docstring that starts with a space."""  # noqa: D210
637 637 | 
638 638 | 
639     |-class SameLine: """This is a docstring on the same line"""
    639 |+class SameLine: """This is a docstring on the same line."""
640 640 | 
641 641 | def same_line(): """This is a docstring on the same line"""
642 642 | 

D.py:641:18: D415 [*] First line should end with a period, question mark, or exclamation point
    |
639 | class SameLine: """This is a docstring on the same line"""
640 | 
641 | def same_line(): """This is a docstring on the same line"""
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ D415
    |
    = help: Add closing punctuation

ℹ Unsafe fix
638 638 | 
639 639 | class SameLine: """This is a docstring on the same line"""
640 640 | 
641     |-def same_line(): """This is a docstring on the same line"""
    641 |+def same_line(): """This is a docstring on the same line."""
642 642 | 
643 643 | 
644 644 | def single_line_docstring_with_an_escaped_backslash():

D.py:664:5: D415 [*] First line should end with a period, question mark, or exclamation point
    |
663 |   def newline_after_closing_quote(self):
664 |       "We enforce a newline after the closing quote for a multi-line docstring \
    |  _____^
665 | |     but continuations shouldn't be considered multi-line"
    | |_________________________________________________________^ D415
    |
    = help: Add closing punctuation

ℹ Unsafe fix
662 662 | 
663 663 | def newline_after_closing_quote(self):
664 664 |     "We enforce a newline after the closing quote for a multi-line docstring \
665     |-    but continuations shouldn't be considered multi-line"
    665 |+    but continuations shouldn't be considered multi-line."
666 666 | 
667 667 | 
668 668 | 


