---
source: crates/ruff_linter/src/rules/pydocstyle/mod.rs
---
D415 [*] First line should end with a period, question mark, or exclamation point
   --> D.py:355:5
    |
353 |         "or exclamation point (not 'y')")
354 | def lwnlkjl():
355 |     """Summary"""
    |     ^^^^^^^^^^^^^
    |
help: Add closing punctuation
    |
354 | def lwnlkjl():
    -     """Summary"""
355 +     """Summary."""
356 |
    |
note: This is an unsafe fix and may change runtime behavior

D415 [*] First line should end with a period, question mark, or exclamation point
   --> D.py:406:25
    |
404 | @expect("D415: First line should end with a period, question mark,"
405 |         " or exclamation point (not 'r')")
406 | def oneliner_withdoc(): """One liner"""
    |                         ^^^^^^^^^^^^^^^
    |
help: Add closing punctuation
    |
405 |         " or exclamation point (not 'r')")
    - def oneliner_withdoc(): """One liner"""
406 + def oneliner_withdoc(): """One liner."""
407 |
    |
note: This is an unsafe fix and may change runtime behavior

D415 [*] First line should end with a period, question mark, or exclamation point
   --> D.py:410:5
    |
409 | def ignored_decorator(func):   # noqa: D400,D401,D415
410 |     """Runs something"""
    |     ^^^^^^^^^^^^^^^^^^^^
411 |     func()
412 |     pass
    |
help: Add closing punctuation
    |
409 | def ignored_decorator(func):   # noqa: D400,D401,D415
    -     """Runs something"""
410 +     """Runs something."""
411 |     func()
    |
note: This is an unsafe fix and may change runtime behavior

D415 [*] First line should end with a period, question mark, or exclamation point
   --> D.py:416:5
    |
415 | def decorator_for_test(func):   # noqa: D400,D401,D415
416 |     """Runs something"""
    |     ^^^^^^^^^^^^^^^^^^^^
417 |     func()
418 |     pass
    |
help: Add closing punctuation
    |
415 | def decorator_for_test(func):   # noqa: D400,D401,D415
    -     """Runs something"""
416 +     """Runs something."""
417 |     func()
    |
note: This is an unsafe fix and may change runtime behavior

D415 [*] First line should end with a period, question mark, or exclamation point
   --> D.py:422:35
    |
421 | @ignored_decorator
422 | def oneliner_ignored_decorator(): """One liner"""
    |                                   ^^^^^^^^^^^^^^^
    |
help: Add closing punctuation
    |
421 | @ignored_decorator
    - def oneliner_ignored_decorator(): """One liner"""
422 + def oneliner_ignored_decorator(): """One liner."""
423 |
    |
note: This is an unsafe fix and may change runtime behavior

D415 [*] First line should end with a period, question mark, or exclamation point
   --> D.py:429:49
    |
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"""
    |                                                 ^^^^^^^^^^^^^^^
    |
help: Add closing punctuation
    |
428 |         " or exclamation point (not 'r')")
    - def oneliner_with_decorator_expecting_errors(): """One liner"""
429 + def oneliner_with_decorator_expecting_errors(): """One liner."""
430 |
    |
note: This is an unsafe fix and may change runtime behavior

D415 [*] First line should end with a period, question mark, or exclamation point
   --> D.py:470:5
    |
468 |         "or exclamation point (not 'g')")
469 | def docstring_bad():
470 |     """Runs something"""
    |     ^^^^^^^^^^^^^^^^^^^^
471 |     pass
    |
help: Add closing punctuation
    |
469 | def docstring_bad():
    -     """Runs something"""
470 +     """Runs something."""
471 |     pass
    |
note: This is an unsafe fix and may change runtime behavior

D415 [*] First line should end with a period, question mark, or exclamation point
   --> D.py:475:5
    |
474 | def docstring_bad_ignore_all():  # noqa
475 |     """Runs something"""
    |     ^^^^^^^^^^^^^^^^^^^^
476 |     pass
    |
help: Add closing punctuation
    |
474 | def docstring_bad_ignore_all():  # noqa
    -     """Runs something"""
475 +     """Runs something."""
476 |     pass
    |
note: This is an unsafe fix and may change runtime behavior

D415 [*] First line should end with a period, question mark, or exclamation point
   --> D.py:480:5
    |
479 | def docstring_bad_ignore_one():  # noqa: D400,D401,D415
480 |     """Runs something"""
    |     ^^^^^^^^^^^^^^^^^^^^
481 |     pass
    |
help: Add closing punctuation
    |
479 | def docstring_bad_ignore_one():  # noqa: D400,D401,D415
    -     """Runs something"""
480 +     """Runs something."""
481 |     pass
    |
note: This is an unsafe fix and may change runtime behavior

D415 [*] First line should end with a period, question mark, or exclamation point
   --> D.py:487:5
    |
485 |         "(perhaps 'Run', not 'Runs')")
486 | def docstring_ignore_some_violations_but_catch_D401():  # noqa: E501,D400,D415
487 |     """Runs something"""
    |     ^^^^^^^^^^^^^^^^^^^^
488 |     pass
    |
help: Add closing punctuation
    |
486 | def docstring_ignore_some_violations_but_catch_D401():  # noqa: E501,D400,D415
    -     """Runs something"""
487 +     """Runs something."""
488 |     pass
    |
note: This is an unsafe fix and may change runtime behavior

D415 [*] First line should end with a period, question mark, or exclamation point
   --> D.py:520:5
    |
518 |         "or exclamation point (not 'g')")
519 | def bad_google_string():  # noqa: D400
520 |     """Test a valid something"""
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
help: Add closing punctuation
    |
519 | def bad_google_string():  # noqa: D400
    -     """Test a valid something"""
520 +     """Test a valid something."""
521 |
    |
note: This is an unsafe fix and may change runtime behavior

D415 [*] First line should end with a period, question mark, or exclamation point
   --> D.py:581:5
    |
579 |         "or exclamation point (not '\"')")
580 | def endswith_quote():
581 |     """Whitespace at the end, but also a quote" """
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
help: Add closing punctuation
    |
580 | def endswith_quote():
    -     """Whitespace at the end, but also a quote" """
581 +     """Whitespace at the end, but also a quote". """
582 |
    |
note: This is an unsafe fix and may change runtime behavior

D415 [*] First line should end with a period, question mark, or exclamation point
   --> 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: Add closing punctuation
    |
614 | def one_liner():
    -     """Wrong."
615 +     """Wrong.".
616 |
    |
note: This is an unsafe fix and may change runtime behavior

D415 [*] First line should end with a period, question mark, or exclamation point
   --> D.py:639:17
    |
639 | class SameLine: """This is a docstring on the same line"""
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
640 |
641 | def same_line(): """This is a docstring on the same line"""
    |
help: Add closing punctuation
    |
638 |
    - class SameLine: """This is a docstring on the same line"""
639 + class SameLine: """This is a docstring on the same line."""
640 |
    |
note: This is an unsafe fix and may change runtime behavior

D415 [*] First line should end with a period, question mark, or exclamation point
   --> D.py:641:18
    |
639 | class SameLine: """This is a docstring on the same line"""
640 |
641 | def same_line(): """This is a docstring on the same line"""
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
help: Add closing punctuation
    |
640 |
    - def same_line(): """This is a docstring on the same line"""
641 + def same_line(): """This is a docstring on the same line."""
642 |
    |
note: This is an unsafe fix and may change runtime behavior

D415 [*] First line should end with a period, question mark, or exclamation point
   --> D.py:664:5
    |
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"
    | |_________________________________________________________^
    |
help: Add closing punctuation
    |
664 |     "We enforce a newline after the closing quote for a multi-line docstring \
    -     but continuations shouldn't be considered multi-line"
665 +     but continuations shouldn't be considered multi-line."
666 |
    |
note: This is an unsafe fix and may change runtime behavior
