Sn1per has uploaded a new change for review.
https://gerrit.wikimedia.org/r/262667
Change subject: Expand docstring for pagegenerators.LinkedPageGenerator
......................................................................
Expand docstring for pagegenerators.LinkedPageGenerator
Also added rtype docstring for page.BasePage.linkedPages
Bug: T118423
Change-Id: If575c131b44cb42c7d6d392b55ba35c3cc1398a3
---
M pywikibot/page.py
M pywikibot/pagegenerators.py
2 files changed, 16 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core
refs/changes/67/262667/1
diff --git a/pywikibot/page.py b/pywikibot/page.py
index 34f30b6..62f4023 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -1291,6 +1291,7 @@
@type content: bool
@return: a generator that yields Page objects.
+ @rtype: generator
"""
return self.site.pagelinks(self, namespaces=namespaces, step=step,
total=total, content=content)
diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py
index 0d5afdf..35ce714 100644
--- a/pywikibot/pagegenerators.py
+++ b/pywikibot/pagegenerators.py
@@ -1218,7 +1218,21 @@
def LinkedPageGenerator(linkingPage, step=None, total=None, content=False):
- """Yield all pages linked from a specific page."""
+ """Yield all pages linked from a specific page.
+
+ See L{pywikibot.page.BasePage.linkedPages} for details.
+
+ @param linkingPage: the page that links to the pages we want
+ @type linkingPage: L{pywikibot.Page}
+ @param step: the limit number of pages to retrieve per API call
+ @type step: int
+ @param total: the total number of pages to iterate
+ @type total: int
+ @param content: if True, retrieve the current content of each linked page
+ @type content: bool
+ @return: a generator that yields Page objects of pages linked to
linkingPage
+ @rtype: generator
+ """
return linkingPage.linkedPages(step=step, total=total, content=content)
--
To view, visit https://gerrit.wikimedia.org/r/262667
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If575c131b44cb42c7d6d392b55ba35c3cc1398a3
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Sn1per <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits