jenkins-bot has submitted this change and it was merged.
Change subject: Removing unused import and variables ......................................................................
Removing unused import and variables
using pyflakes Change-Id: I543bb4faca8cbcaadb10f6153b2a971e18a4c886 --- M commonscat.py M cosmetic_changes.py M delete.py M fixing_redirects.py 4 files changed, 1 insertion(+), 13 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/commonscat.py b/commonscat.py index 13866f9..b6a3717 100644 --- a/commonscat.py +++ b/commonscat.py @@ -56,7 +56,6 @@ import re
import wikipedia as pywikibot -import config import pagegenerators import add_text
@@ -569,7 +568,6 @@
summary = None generator = None - checkcurrent = False always = False ns = [] ns.append(14) @@ -583,7 +581,6 @@ else: summary = arg[9:] elif arg.startswith('-checkcurrent'): - checkcurrent = True primaryCommonscat, commonscatAlternatives = \ CommonscatBot.getCommonscatTemplate( pywikibot.getSite().language()) diff --git a/cosmetic_changes.py b/cosmetic_changes.py index 9377307..31a1fe1 100644 --- a/cosmetic_changes.py +++ b/cosmetic_changes.py @@ -59,7 +59,6 @@ # __version__ = '$Id$' # -import sys import re import wikipedia as pywikibot import isbn @@ -251,7 +250,7 @@ try: categories = pywikibot.getCategoryLinks(text, site=self.site) # there are categories like [[categoy:Foo {{#time:Y...}}]] - except InvalidTitle: + except pywikibot.InvalidTitle: pass
if not self.talkpage: # and pywikibot.calledModuleName() <> 'interwiki': @@ -534,7 +533,6 @@ return text
def removeUselessSpaces(self, text): - result = [] multipleSpacesR = re.compile(' +') spaceAtLineEndR = re.compile(' $')
diff --git a/delete.py b/delete.py index 7c14955..029b3f0 100644 --- a/delete.py +++ b/delete.py @@ -34,8 +34,6 @@
import pywikibot from pywikibot import i18n -import config -import catlib import pagegenerators
diff --git a/fixing_redirects.py b/fixing_redirects.py index d35badf..475697a 100644 --- a/fixing_redirects.py +++ b/fixing_redirects.py @@ -88,11 +88,6 @@ if actualLinkPage != linkedPage: continue
- # how many bytes should be displayed around the current link - context = 15 - # at the beginning of the link, start red color. - # at the end of the link, reset the color to default - #pywikibot.output(text[max(0, m.start() - context) : m.start()] + '\03{lightred}' + text[m.start() : m.end()] + '\03{default}' + text[m.end() : m.end() + context]) choice = 'y'
# The link looks like this:
pywikibot-commits@lists.wikimedia.org