jenkins-bot submitted this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[doc] Fix documentation of textlib.extract_sections

Change-Id: Iccb59278da66085836966bb2bae362abc6382b37
---
M pywikibot/textlib.py
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py
index dbe0997..7ec61c5 100644
--- a/pywikibot/textlib.py
+++ b/pywikibot/textlib.py
@@ -938,7 +938,7 @@
def extract_sections(
text: str, site=None
) -> NamedTuple('_Content', [('header', str), # noqa: F821
- ('body', List[Tuple[str, str]]), # noqa: F821
+ ('sections', List[Tuple[str, str]]), # noqa: F821
('footer', str)]): # noqa: F821
"""
Return section headings and contents found in text.
@@ -965,8 +965,8 @@

result = extract_sections(text, site)
result.header = "'''A''' is a thing."
- result.body = [('== History of A ==', 'Some history...'),
- ('== Usage of A ==', 'Some usage...')]
+ result.sections = [('== History of A ==', 'Some history...'),
+ ('== Usage of A ==', 'Some usage...')]
result.footer = '[[Category:Things starting with A]]'

.. versionadded:: 3.0

To view, visit change 810936. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Iccb59278da66085836966bb2bae362abc6382b37
Gerrit-Change-Number: 810936
Gerrit-PatchSet: 2
Gerrit-Owner: Matěj Suchánek <matejsuchanek97@gmail.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged