Xqt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/95807


Change subject: [PEP8] remaining pep8 fixes
......................................................................

[PEP8] remaining pep8 fixes

Change-Id: I5ae9b7e0f268ea755f0addf6231d0f548cc8d7db
---
M archivebot.py
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat 
refs/changes/07/95807/1

diff --git a/archivebot.py b/archivebot.py
index bb11637..2b1a5f7 100644
--- a/archivebot.py
+++ b/archivebot.py
@@ -166,7 +166,7 @@
 def int2month(num):
     """Returns the locale's full name of month 'num' (1-12)."""
     if hasattr(locale, 'nl_langinfo'):
-        return locale.nl_langinfo(locale.MON_1+num-1).decode('utf-8')
+        return locale.nl_langinfo(locale.MON_1 + num - 1).decode('utf-8')
     Months = ['january', 'february', 'march', 'april', 'may_long', 'june',
               'july', 'august', 'september', 'october', 'november', 'december']
     return Site.mediawiki_message(Months[num - 1])
@@ -446,7 +446,7 @@
 
     def key_ok(self):
         s = new_hash()
-        s.update(self.salt+'\n')
+        s.update(self.salt + '\n')
         s.update(self.Page.title().encode('utf8') + '\n')
         return self.get('key') == s.hexdigest()
 
@@ -531,7 +531,7 @@
             return
         if whys:
             pywikibot.output(u'Archiving %d thread(s).' % self.archivedThreads)
-            #Save the archives first (so that bugs don't cause a loss of data)
+            # Save the archives first (so that bugs don't cause a loss of data)
             for a in sorted(self.archives.keys()):
                 self.commentParams['count'] = self.archives[a].archivedThreads
                 comment = i18n.twntranslate(language,
@@ -540,7 +540,7 @@
                 self.archives[a].update(comment)
 
             #Save the page itself
-            rx = re.compile('{{'+self.tpl+'\n.*?\n}}', re.DOTALL)
+            rx = re.compile('{{%s\n.*?\n}}' % self.tpl, re.DOTALL)
             self.Page.header = rx.sub(self.attr2text(), self.Page.header)
             self.commentParams['count'] = self.archivedThreads
             self.commentParams['archives'] = ', '.join(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ae9b7e0f268ea755f0addf6231d0f548cc8d7db
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Xqt <i...@gno.de>

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

Reply via email to