Skip to content

Commit fb838ab

Browse files
committed
Docstring written for main() function
1 parent bbfffbe commit fb838ab

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

doc/sphinxext/announce.py

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,41 @@ def build_string(revision_range, heading="Contributors"):
316316

317317

318318
def main(revision_range):
319-
# document authors
319+
"""
320+
Generate and print the contributors list for a given revision range.
321+
322+
This function builds a formatted string of contributors who have made changes
323+
within the specified revision range and prints it to the standard output.
324+
325+
Parameters
326+
----------
327+
revision_range : str
328+
The revision range to get the contributors from, specified in the format
329+
'start_revision..end_revision'.
330+
331+
Returns
332+
-------
333+
None
334+
335+
Notes
336+
-----
337+
- The function relies on `build_string` to generate the formatted contributors list.
338+
- The contributors list includes a heading, an underlined heading, a message about the authors,
339+
and a list of authors with new contributors marked.
340+
341+
Examples
342+
--------
343+
>>> main('v1.0.0..v1.1.0')
344+
345+
Authors
346+
============
347+
- TomAugspurger
348+
- gfyoung
349+
- datapythonista
350+
- jreback
351+
- jschendel
352+
- ...
353+
"""
320354
text = build_string(revision_range)
321355
print(text)
322356

0 commit comments

Comments
 (0)