jenkins-bot has submitted this change and it was merged.

Change subject: [PEP8] changes
......................................................................


[PEP8] changes

Change-Id: I229af6fe92766a0ae666370ac64b111ae048c493
---
M userlib.py
1 file changed, 18 insertions(+), 13 deletions(-)

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



diff --git a/userlib.py b/userlib.py
index 21e7c74..45704bd 100644
--- a/userlib.py
+++ b/userlib.py
@@ -20,26 +20,33 @@
     The class AutoblockUserError is an exception that is raised whenever
     an action is requested on a virtual autoblock user that's not available
     for him (i.e. roughly everything except unblock).
+
     """
     pass
 
 
-class UserActionRefuse(pywikibot.Error): pass
+class UserActionRefuse(pywikibot.Error):
+    pass
 
 
-class BlockError(UserActionRefuse): pass
+class BlockError(UserActionRefuse):
+    pass
 
 
-class AlreadyBlocked(BlockError): pass
+class AlreadyBlocked(BlockError):
+    pass
 
 
-class UnblockError(UserActionRefuse): pass
+class UnblockError(UserActionRefuse):
+    pass
 
 
-class BlockIDError(UnblockError): pass
+class BlockIDError(UnblockError):
+    pass
 
 
-class AlreadyUnblocked(UnblockError): pass
+class AlreadyUnblocked(UnblockError):
+    pass
 
 
 class InvalidUser(pywikibot.InvalidTitle):
@@ -313,7 +320,7 @@
             'action': 'query',
             'list': 'usercontribs',
             'ucuser': self.name(),
-            'ucprop': ['ids', 'title', 'timestamp', 'comment'],  # 
'size','flags'],
+            'ucprop': ['ids', 'title', 'timestamp', 'comment'],  # 'size', 
'flags'],
             'uclimit': limit,
             'ucdir': 'older',
         }
@@ -345,7 +352,6 @@
                 params.update(result['query-continue']['usercontribs'])
             else:
                 break
-        return
 
     def uploadedImages(self, number=10):
         """ Yield tuples describing files uploaded by this user.
@@ -365,9 +371,8 @@
 
         for item in self.site().logpages(number, mode='upload',
                                          user=self.username, dump=True):
-            yield pywikibot.ImagePage(self.site(), item['title']), \
-                  item['timestamp'], item['comment'], item['pageid'] > 0
-        return
+            yield (pywikibot.ImagePage(self.site(), item['title']),
+                   item['timestamp'], item['comment'], item['pageid'] > 0)
 
     def _uploadedImagesOld(self, number=10):
         """Yield ImagePages from Special:Log&type=upload"""
@@ -389,7 +394,7 @@
             if m.group('new'):
                 deleted = True
                 if redlink_tail_len:
-                    image = image[0:0-redlink_tail_len]
+                    image = image[0:0 - redlink_tail_len]
 
             date = m.group('date')
             comment = m.group('comment') or ''
@@ -581,7 +586,7 @@
             if self.site().mediawiki_message(
                     'ipb_cant_unblock').replace('$1', blockID) in data:
                 raise AlreadyUnblockedError
-            raise UnblockError, data
+            raise UnblockError(data)
         return True
 
     def getBlockIDOld(self):

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I229af6fe92766a0ae666370ac64b111ae048c493
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to