---
source: crates/ruff_linter/src/rules/pydocstyle/mod.rs
---
D403 [*] First word of the docstring should be capitalized: `this` -> `This`
 --> D403.py:2:5
  |
1 | def bad_function():
2 |     """this docstring is not capitalized"""
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3 |
4 | def good_function():
  |
help: Capitalize `this` to `This`
  |
1 | def bad_function():
  -     """this docstring is not capitalized"""
2 +     """This docstring is not capitalized"""
3 |
  |

D403 [*] First word of the docstring should be capitalized: `singleword` -> `Singleword`
  --> D403.py:30:5
   |
29 | def single_word():
30 |     """singleword."""
   |     ^^^^^^^^^^^^^^^^^
31 |
32 | def single_word_no_dot():
   |
help: Capitalize `singleword` to `Singleword`
   |
29 | def single_word():
   -     """singleword."""
30 +     """Singleword."""
31 |
   |

D403 [*] First word of the docstring should be capitalized: `singleword` -> `Singleword`
  --> D403.py:33:5
   |
32 | def single_word_no_dot():
33 |     """singleword"""
   |     ^^^^^^^^^^^^^^^^
34 |
35 | def first_word_lots_of_whitespace():
   |
help: Capitalize `singleword` to `Singleword`
   |
32 | def single_word_no_dot():
   -     """singleword"""
33 +     """Singleword"""
34 |
   |

D403 [*] First word of the docstring should be capitalized: `here` -> `Here`
  --> D403.py:36:5
   |
35 |   def first_word_lots_of_whitespace():
36 | /     """
37 | |
38 | |
39 | |
40 | |     here is the start of my docstring!
41 | |
42 | |     What do you think?    
43 | |     """
   | |_______^
44 |
45 |   def single_word_newline():
   |
help: Capitalize `here` to `Here`
   |
39 |
   -     here is the start of my docstring!
40 +     Here is the start of my docstring!
41 |
   |

D403 [*] First word of the docstring should be capitalized: `singleword` -> `Singleword`
  --> D403.py:46:5
   |
45 |   def single_word_newline():
46 | /     """singleword
47 | |
48 | |     """
   | |_______^
49 |
50 |   def single_word_dot_newline():
   |
help: Capitalize `singleword` to `Singleword`
   |
45 | def single_word_newline():
   -     """singleword
46 +     """Singleword
47 |
   |

D403 [*] First word of the docstring should be capitalized: `singleword` -> `Singleword`
  --> D403.py:51:5
   |
50 |   def single_word_dot_newline():
51 | /     """singleword.
52 | |
53 | |     """
   | |_______^
54 |
55 |   def single_word_second_line():
   |
help: Capitalize `singleword` to `Singleword`
   |
50 | def single_word_dot_newline():
   -     """singleword.
51 +     """Singleword.
52 |
   |

D403 [*] First word of the docstring should be capitalized: `singleword` -> `Singleword`
  --> D403.py:56:5
   |
55 |   def single_word_second_line():
56 | /     """
57 | |     singleword
58 | |     """
   | |_______^
59 |
60 |   def single_word_dot_second_line():
   |
help: Capitalize `singleword` to `Singleword`
   |
56 |     """
   -     singleword
57 +     Singleword
58 |     """
   |

D403 [*] First word of the docstring should be capitalized: `singleword` -> `Singleword`
  --> D403.py:61:5
   |
60 |   def single_word_dot_second_line():
61 | /     """
62 | |     singleword.
63 | |     """
   | |_______^
64 |
65 |   def single_word_then_more_text():
   |
help: Capitalize `singleword` to `Singleword`
   |
61 |     """
   -     singleword.
62 +     Singleword.
63 |     """
   |

D403 [*] First word of the docstring should be capitalized: `singleword` -> `Singleword`
  --> D403.py:66:5
   |
65 |   def single_word_then_more_text():
66 | /     """singleword
67 | |
68 | |     This is more text.
69 | |     """
   | |_______^
70 |
71 |   def single_word_dot_then_more_text():
   |
help: Capitalize `singleword` to `Singleword`
   |
65 | def single_word_then_more_text():
   -     """singleword
66 +     """Singleword
67 |
   |

D403 [*] First word of the docstring should be capitalized: `singleword` -> `Singleword`
  --> D403.py:72:5
   |
71 |   def single_word_dot_then_more_text():
72 | /     """singleword.
73 | |
74 | |     This is more text.
75 | |     """
   | |_______^
76 |
77 |   def single_word_second_line_then_more_text():
   |
help: Capitalize `singleword` to `Singleword`
   |
71 | def single_word_dot_then_more_text():
   -     """singleword.
72 +     """Singleword.
73 |
   |

D403 [*] First word of the docstring should be capitalized: `singleword` -> `Singleword`
  --> D403.py:78:5
   |
77 |   def single_word_second_line_then_more_text():
78 | /     """
79 | |     singleword
80 | |
81 | |     This is more text.
82 | |     """
   | |_______^
83 |
84 |   def single_word_dot_second_line_then_more_text():
   |
help: Capitalize `singleword` to `Singleword`
   |
78 |     """
   -     singleword
79 +     Singleword
80 |
   |

D403 [*] First word of the docstring should be capitalized: `singleword` -> `Singleword`
  --> D403.py:85:5
   |
84 |   def single_word_dot_second_line_then_more_text():
85 | /     """
86 | |     singleword.
87 | |
88 | |     This is more text.
89 | |     """
   | |_______^
   |
help: Capitalize `singleword` to `Singleword`
   |
85 |     """
   -     singleword.
86 +     Singleword.
87 |
   |
