jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/333328 )

Change subject: Make ItemClaimFilter.__filter_match always return bool
......................................................................


Make ItemClaimFilter.__filter_match always return bool

And also improve ItemClaimFilter.filter's documentation.

Change-Id: Ifecbc61809a4cf1a6c736deb8b70601f19f8d404
---
M pywikibot/pagegenerators.py
1 file changed, 4 insertions(+), 3 deletions(-)

Approvals:
  Mpaa: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py
index afb752c..fc5060c 100644
--- a/pywikibot/pagegenerators.py
+++ b/pywikibot/pagegenerators.py
@@ -1518,20 +1518,21 @@
                     if not page_claim.has_qualifier(prop, val):
                         return False
                 return True
+        return False
 
     @classmethod
     def filter(cls, generator, prop, claim, qualifiers=None, negate=False):
         """
-        Yield all ItemPages which does contain certain claim in a property.
+        Yield all ItemPages which contain certain claim in a property.
 
         @param prop: property id to check
         @type prop: str
         @param claim: value of the property to check. Can be exact value (for
-            instance, ItemPage instance) or ItemPage ID string (e.g. 'Q37470').
+            instance, ItemPage instance) or a string (e.g. 'Q37470').
         @param qualifiers: dict of qualifiers that must be present, or None if
             qualifiers are irrelevant
         @type qualifiers: dict or None
-        @param negate: true if pages that does *not* contain specified claim
+        @param negate: true if pages that do *not* contain specified claim
             should be yielded, false otherwise
         @type negate: bool
         """

-- 
To view, visit https://gerrit.wikimedia.org/r/333328
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifecbc61809a4cf1a6c736deb8b70601f19f8d404
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek <matejsuchane...@gmail.com>
Gerrit-Reviewer: Dalba <dalba.w...@gmail.com>
Gerrit-Reviewer: Magul <tomasz.magul...@gmail.com>
Gerrit-Reviewer: Mpaa <mpaa.w...@gmail.com>
Gerrit-Reviewer: Xqt <i...@gno.de>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to