@@ -64,11 +64,11 @@ def read_parameters_section(
6464 Parse a "parameters" section.
6565
6666 Arguments:
67- lines : The parameters block lines .
68- start_index: The line number to start at .
67+ docstring : The raw docstring .
68+ docstring_obj: Docstring object parsed by docstring_parser .
6969
7070 Returns:
71- A tuple containing a `Section` (or `None`) and the index at which to continue parsing .
71+ A `Section` object (or `None` if section is empty) .
7272 """
7373 parameters = []
7474
@@ -114,10 +114,11 @@ def read_attributes_section(
114114 Parse an "attributes" section.
115115
116116 Arguments:
117+ docstring: The raw docstring.
117118 docstring_obj: Docstring object parsed by docstring_parser.
118119
119120 Returns:
120- A tuple containing a `Section` (or `None`).
121+ A `Section` object (or `None` if section is empty ).
121122 """
122123 attributes = []
123124 docstring_attributes = [p for p in docstring_obj .params if p .args [0 ] == "attribute" ]
@@ -146,10 +147,11 @@ def read_exceptions_section(
146147 Parse an "exceptions" section.
147148
148149 Arguments:
150+ docstring: The raw docstring.
149151 docstring_obj: Docstring object parsed by docstring_parser.
150152
151153 Returns:
152- A tuple containing a `Section` (or `None`) and the index at which to continue parsing .
154+ A `Section` object (or `None` if section is empty) .
153155 """
154156 exceptions = []
155157 except_obj = docstring_obj .raises
@@ -174,7 +176,7 @@ def read_return_section(
174176 docstring_obj: Docstring object parsed by docstring_parser.
175177
176178 Returns:
177- A tuple containing a `Section` (or `None`).
179+ A `Section` object (or `None` if section is empty ).
178180 """
179181 return_obj = docstring_obj .returns if docstring_obj .returns else []
180182 text = return_obj .description if return_obj else ""
@@ -206,10 +208,11 @@ def read_examples_section(
206208 Parse an "examples" section.
207209
208210 Arguments:
211+ docstring: The raw docstring.
209212 docstring_obj: Docstring object parsed by docstring_parser.
210213
211214 Returns:
212- A tuple containing a `Section` (or `None`).
215+ A `Section` object (or `None` if section is empty ).
213216 """
214217 text = next (
215218 (
0 commit comments