---
source: crates/ruff_linter/src/rules/pydoclint/mod.rs
---
DOC501 Raised exception `FasterThanLightError` missing from docstring
  --> DOC501_google.py:34:5
   |
32 |   # DOC501
33 |   def calculate_speed(distance: float, time: float) -> float:
34 | /     """Calculate speed as distance divided by time.
35 | |
36 | |     Args:
37 | |         distance: Distance traveled.
38 | |         time: Time spent traveling.
39 | |
40 | |     Returns:
41 | |         Speed as distance divided by time.
42 | |     """
   | |_______^
43 |       try:
44 |           return distance / time
   |
help: Add `FasterThanLightError` to the docstring

DOC501 Raised exception `ValueError` missing from docstring
  --> DOC501_google.py:51:5
   |
49 |   # DOC501
50 |   def calculate_speed(distance: float, time: float) -> float:
51 | /     """Calculate speed as distance divided by time.
52 | |
53 | |     Args:
54 | |         distance: Distance traveled.
55 | |         time: Time spent traveling.
56 | |
57 | |     Returns:
58 | |         Speed as distance divided by time.
59 | |     """
   | |_______^
60 |       try:
61 |           return distance / time
   |
help: Add `ValueError` to the docstring

DOC501 Raised exception `FasterThanLightError` missing from docstring
  --> DOC501_google.py:51:5
   |
49 |   # DOC501
50 |   def calculate_speed(distance: float, time: float) -> float:
51 | /     """Calculate speed as distance divided by time.
52 | |
53 | |     Args:
54 | |         distance: Distance traveled.
55 | |         time: Time spent traveling.
56 | |
57 | |     Returns:
58 | |         Speed as distance divided by time.
59 | |     """
   | |_______^
60 |       try:
61 |           return distance / time
   |
help: Add `FasterThanLightError` to the docstring

DOC501 Raised exception `ZeroDivisionError` missing from docstring
  --> DOC501_google.py:70:5
   |
68 |   # DOC501
69 |   def calculate_speed(distance: float, time: float) -> float:
70 | /     """Calculate speed as distance divided by time.
71 | |
72 | |     Args:
73 | |         distance: Distance traveled.
74 | |         time: Time spent traveling.
75 | |
76 | |     Returns:
77 | |         Speed as distance divided by time.
78 | |     """
   | |_______^
79 |       try:
80 |           return distance / time
   |
help: Add `ZeroDivisionError` to the docstring

DOC501 Raised exception `ValueError` missing from docstring
  --> DOC501_google.py:88:5
   |
86 |   # DOC501
87 |   def calculate_speed(distance: float, time: float) -> float:
88 | /     """Calculate speed as distance divided by time.
89 | |
90 | |     Args:
91 | |         distance: Distance traveled.
92 | |         time: Time spent traveling.
93 | |
94 | |     Returns:
95 | |         Speed as distance divided by time.
96 | |     """
   | |_______^
97 |       try:
98 |           return distance / time
   |
help: Add `ValueError` to the docstring

DOC501 Raised exception `ZeroDivisionError` missing from docstring
  --> DOC501_google.py:88:5
   |
86 |   # DOC501
87 |   def calculate_speed(distance: float, time: float) -> float:
88 | /     """Calculate speed as distance divided by time.
89 | |
90 | |     Args:
91 | |         distance: Distance traveled.
92 | |         time: Time spent traveling.
93 | |
94 | |     Returns:
95 | |         Speed as distance divided by time.
96 | |     """
   | |_______^
97 |       try:
98 |           return distance / time
   |
help: Add `ZeroDivisionError` to the docstring

DOC501 Raised exception `AnotherError` missing from docstring
   --> DOC501_google.py:106:5
    |
104 |   # DOC501
105 |   def calculate_speed(distance: float, time: float) -> float:
106 | /     """Calculate speed as distance divided by time.
107 | |
108 | |     Args:
109 | |         distance: Distance traveled.
110 | |         time: Time spent traveling.
111 | |
112 | |     Returns:
113 | |         Speed as distance divided by time.
114 | |     """
    | |_______^
115 |       raise AnotherError
    |
help: Add `AnotherError` to the docstring

DOC501 Raised exception `AnotherError` missing from docstring
   --> DOC501_google.py:120:5
    |
118 |   # DOC501
119 |   def calculate_speed(distance: float, time: float) -> float:
120 | /     """Calculate speed as distance divided by time.
121 | |
122 | |     Args:
123 | |         distance: Distance traveled.
124 | |         time: Time spent traveling.
125 | |
126 | |     Returns:
127 | |         Speed as distance divided by time.
128 | |     """
    | |_______^
129 |       raise AnotherError()
    |
help: Add `AnotherError` to the docstring

DOC501 Raised exception `SomeError` missing from docstring
   --> DOC501_google.py:134:5
    |
132 |   # DOC501
133 |   def foo(bar: int):
134 | /     """Foo.
135 | |
136 | |     Args:
137 | |         bar: Bar.
138 | |     """
    | |_______^
139 |       raise something.SomeError
    |
help: Add `SomeError` to the docstring

DOC501 Raised exception `ZeroDivisionError` missing from docstring
   --> DOC501_google.py:197:5
    |
195 |   # DOC501
196 |   def calculate_speed(distance: float, time: float) -> float:
197 | /     """Calculate speed as distance divided by time.
198 | |
199 | |     Args:
200 | |         distance: Distance traveled.
201 | |         time: Time spent traveling.
202 | |
203 | |     Returns:
204 | |         Speed as distance divided by time.
205 | |
206 | |     Raises:
207 | |         TypeError: if you didn't pass a number for both parameters
208 | |     """
    | |_______^
209 |       try:
210 |           return distance / time
    |
help: Add `ZeroDivisionError` to the docstring

DOC501 Raised exception `TypeError` missing from docstring
   --> DOC501_google.py:238:5
    |
237 |   def foo():
238 | /     """Foo.
239 | |
240 | |     Returns:
241 | |         42: int.
242 | |     """
    | |_______^
243 |       if True:
244 |           raise TypeError  # DOC501
    |
help: Add `TypeError` to the docstring

DOC501 Raised exception `ValueError` missing from docstring
   --> DOC501_google.py:238:5
    |
237 |   def foo():
238 | /     """Foo.
239 | |
240 | |     Returns:
241 | |         42: int.
242 | |     """
    | |_______^
243 |       if True:
244 |           raise TypeError  # DOC501
    |
help: Add `ValueError` to the docstring
