jenkins-bot has submitted this change and it was merged.
Change subject: code improvements using pyflakes ......................................................................
code improvements using pyflakes
Removing unused variables and several other stuffs
Change-Id: Id64b3172f25b8376e202a9bcf62d5ce4fcc8bb7e --- M unusedfiles.py M weblinkchecker.py M welcome.py 3 files changed, 3 insertions(+), 7 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/unusedfiles.py b/unusedfiles.py index 16b8c35..a502678 100644 --- a/unusedfiles.py +++ b/unusedfiles.py @@ -22,7 +22,7 @@
import wikipedia as pywikibot import pagegenerators -import sys +import re
comment = { 'ar': u'صور للاستبعاد', @@ -83,8 +83,6 @@ for arg in pywikibot.handleArgs(): if arg == '-always': always = True - if arg == '-start': - start = True
mysite = pywikibot.getSite() # If anything needs to be prepared, you can do it here @@ -100,7 +98,7 @@ pywikibot.output(u"\n\n>>> \03{lightpurple}%s\03{default} <<<" % page.title()) if except_text_translated not in page.getImagePageHtml() and \ - 'http://' not in page.get(): + not re.search("https?://", page.get()): pywikibot.output(u'\n' + page.title()) if template_image in page.get(): pywikibot.output(u"%s done already" diff --git a/weblinkchecker.py b/weblinkchecker.py index 1eaa96b..2cd1e11 100644 --- a/weblinkchecker.py +++ b/weblinkchecker.py @@ -94,7 +94,6 @@ # __version__ = '$Id$'
-import sys import re import codecs import pickle @@ -254,7 +253,7 @@ conn.request('HEAD', '/', None, self.header) self.response = conn.getresponse()
- self.readEncodingFromResponse(response) + self.readEncodingFromResponse(self.response) except: pass if not self.serverEncoding: diff --git a/welcome.py b/welcome.py index c54ce8d..9c76207 100644 --- a/welcome.py +++ b/welcome.py @@ -192,7 +192,6 @@ import pywikibot from pywikibot import i18n import config -import query import userlib
locale.setlocale(locale.LC_ALL, '')