Happy5214 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/357957 )

Change subject: [WIP] Add on to pywikibot support for thanking normal revisions
......................................................................

[WIP] Add on to pywikibot support for thanking normal revisions

This second commit:
 - Renames thankable to isThankable to match existing convention.

Bug: T135409
Change-Id: Ib3a35fea2442099fb685ddf0097e6c4003a69fd7
---
M pywikibot/page.py
M tests/thanks_tests.py
2 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/57/357957/1

diff --git a/pywikibot/page.py b/pywikibot/page.py
index 450da57..506eeee 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -3463,7 +3463,7 @@
                    )
 
     @property
-    def thankable(self):
+    def isThankable(self):
         """
         Determine if the user has thanks notifications enabled.
 
@@ -3474,7 +3474,7 @@
 
         @rtype: bool
         """
-        return not self.isAnonymous()
+        return not (self.isAnonymous() or 'bot' in self.groups())
 
 
 class WikibasePage(BasePage):
diff --git a/tests/thanks_tests.py b/tests/thanks_tests.py
index aeeb297..5c45bc4 100644
--- a/tests/thanks_tests.py
+++ b/tests/thanks_tests.py
@@ -35,7 +35,7 @@
             revid = i['revid']
             username = i['user']
             user = User(site, username)
-            if user.thankable:
+            if user.isThankable:
                 can_thank = True
                 break
         if not can_thank:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib3a35fea2442099fb685ddf0097e6c4003a69fd7
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Happy5214 <happy5...@gmail.com>

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

Reply via email to