jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/361419 )
Change subject: [DOC] Add some documetations to page() methods ......................................................................
[DOC] Add some documetations to page() methods
Change-Id: Id61d6632ac1512c429ec3f3d7be7d221fddbfdf2 --- M pywikibot/logentries.py 1 file changed, 10 insertions(+), 4 deletions(-)
Approvals: Dalba: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/logentries.py b/pywikibot/logentries.py index 80cf38c..26dd3cf 100644 --- a/pywikibot/logentries.py +++ b/pywikibot/logentries.py @@ -97,8 +97,11 @@ """ Page on which action was performed.
- Note: title may be missing in data dict e.g. by oversight action to - hide the title. In that case a KeyError exception will raise + @note: title may be missing in data dict e.g. by oversight action to + hide the title. In that case a KeyError exception will raise + + @rtype: pywikibot.Page + @raise: KeyError: title was missing from log entry """ if not hasattr(self, '_page'): self._page = pywikibot.Page(self.site, self.data['title']) @@ -138,6 +141,9 @@
This returns a User object instead of the Page object returned by the superclass method. + + @return: target user + @rtype: pywikibot.User """ if not hasattr(self, '_page'): self._page = pywikibot.User(super(UserTargetLogEntry, self).page()) @@ -172,7 +178,7 @@ @return: the Page object of username or IP if this block action targets a username or IP, or the blockid if this log reflects the removal of an autoblock - @rtype: Page or int + @rtype: pywikibot.Page or int """ # TODO what for IP ranges ? if self.isAutoblockRemoval: @@ -277,7 +283,7 @@ Note: title may be missing in data dict e.g. by oversight action to hide the title. In that case a KeyError exception will raise
- @rtype: FilePage + @rtype: pywikibot.FilePage @raise: KeyError: title was missing from log entry """ if not hasattr(self, '_page'):
pywikibot-commits@lists.wikimedia.org