jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/487054 )
Change subject: [pep8] fix naming issues after changes of pep8-naming 0.8.0 ......................................................................
[pep8] fix naming issues after changes of pep8-naming 0.8.0
Change-Id: If7601b279cb3119f08d49bf4d9bb7d529a091256 --- M pywikibot/botirc.py M pywikibot/config2.py M pywikibot/data/api.py M pywikibot/data/mysql.py M pywikibot/logentries.py M pywikibot/page.py M pywikibot/pagegenerators.py M pywikibot/proofreadpage.py M pywikibot/tools/__init__.py M pywikibot/weblib.py M scripts/add_text.py M scripts/basic.py M scripts/capitalize_redirects.py M scripts/category.py M scripts/category_redirect.py M scripts/cfd.py M scripts/claimit.py M scripts/commons_link.py M scripts/coordinate_import.py M scripts/delete.py M scripts/fixing_redirects.py M scripts/followlive.py M scripts/illustrate_wikidata.py M scripts/interwiki.py M scripts/interwikidata.py M scripts/listpages.py M scripts/lonelypages.py M scripts/movepages.py M scripts/ndashredir.py M scripts/piper.py M scripts/protect.py M scripts/revertbot.py M scripts/selflink.py M scripts/spamremove.py M scripts/surnames_redirects.py M scripts/table2wiki.py M scripts/touch.py M scripts/transferbot.py M scripts/weblinkchecker.py M scripts/welcome.py M scripts/wikisourcetext.py M tests/api_tests.py M tests/aspects.py M tests/dry_site_tests.py M tests/flow_thanks_tests.py M tests/logentry_tests.py M tests/thanks_tests.py M tests/tk_tests.py M tox.ini 49 files changed, 187 insertions(+), 214 deletions(-)
Approvals: Dalba: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/botirc.py b/pywikibot/botirc.py index 63122df..b6d0a7d 100644 --- a/pywikibot/botirc.py +++ b/pywikibot/botirc.py @@ -7,7 +7,7 @@ """ # # (C) Balasyum, 2008 -# (C) Pywikibot team, 2008-2018 +# (C) Pywikibot team, 2008-2019 # # Distributed under the terms of the MIT license. # @@ -53,8 +53,7 @@ # Only the keys of the dict can be passed as init options # The values are the default values # Extend this in subclasses! - availableOptions = { - } + availableOptions = {} # noqa: N815
def __init__(self, site, channel, nickname, server, port=6667, **kwargs): """Initializer.""" diff --git a/pywikibot/config2.py b/pywikibot/config2.py index f20c170..8b42641 100644 --- a/pywikibot/config2.py +++ b/pywikibot/config2.py @@ -33,7 +33,7 @@ """ # # (C) Rob W.W. Hooft, 2003 -# (C) Pywikibot team, 2003-2018 +# (C) Pywikibot team, 2003-2019 # # Distributed under the terms of the MIT license. # @@ -975,9 +975,9 @@ _winreg = winreg # exists for git blame only; do not use try: key1 = winreg.OpenKey(winreg.HKEY_CURRENT_USER, key_name) - _progID = winreg.EnumValue(key1, 0)[0] + _prog_id = winreg.EnumValue(key1, 0)[0] _key2 = _winreg.OpenKey(_winreg.HKEY_CLASSES_ROOT, - r'%s\shell\open\command' % _progID) + r'%s\shell\open\command' % _prog_id) _cmd = _winreg.QueryValueEx(_key2, None)[0] # See T102465 for issues relating to using this value. cmd = _cmd diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index 39fbb26..82b4f78 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -24,7 +24,7 @@ from warnings import warn
try: - import cPickle as pickle + import cPickle as pickle # noqa: N813 except ImportError: import pickle
diff --git a/pywikibot/data/mysql.py b/pywikibot/data/mysql.py index ebe5063..2e13b5b 100644 --- a/pywikibot/data/mysql.py +++ b/pywikibot/data/mysql.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Miscellaneous helper functions for mysql queries.""" # -# (C) Pywikibot team, 2016-2018 +# (C) Pywikibot team, 2016-2019 # # Distributed under the terms of the MIT license. # @@ -15,7 +15,7 @@ import pymysql as mysqldb except ImportError: try: - import MySQLdb as mysqldb + import MySQLdb as mysqldb # noqa: N813 except ImportError: raise ImportError('No supported MySQL library installed. ' 'Please install PyMySQL.') diff --git a/pywikibot/logentries.py b/pywikibot/logentries.py index 142332b..6020fee 100644 --- a/pywikibot/logentries.py +++ b/pywikibot/logentries.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Objects representing Mediawiki log entries.""" # -# (C) Pywikibot team, 2007-2018 +# (C) Pywikibot team, 2007-2019 # # Distributed under the terms of the MIT license. # @@ -51,13 +51,13 @@ # Log type expected. None for every type, or one of the (letype) str : # block/patrol/etc... # Overridden in subclasses. - _expectedType = None + _expected_type = None
def __init__(self, apidata, site): """Initialize object from a logevent dict returned by MW API.""" self.data = LogDict(apidata) self.site = site - expected_type = self._expectedType + expected_type = self._expected_type if expected_type is not None and expected_type != self.type(): raise Error('Wrong log type! Expecting %s, received %s instead.' % (expected_type, self.type())) @@ -95,7 +95,7 @@ if 'params' in self.data: return self.data['params'] else: # try old mw style preceding mw 1.19 - return self.data[self._expectedType] + return self.data[self._expected_type]
def logid(self): """Return the id of the log entry.""" @@ -192,7 +192,7 @@ expiry and flags are not available on unblock log entries. """
- _expectedType = 'block' + _expected_type = 'block'
def __init__(self, apidata, site): """Initializer.""" @@ -272,7 +272,7 @@
"""Rights log entry."""
- _expectedType = 'rights' + _expected_type = 'rights'
@property def oldgroups(self): @@ -295,7 +295,7 @@
"""Upload log entry."""
- _expectedType = 'upload' + _expected_type = 'upload'
def page(self): """ @@ -312,7 +312,7 @@
"""Move log entry."""
- _expectedType = 'move' + _expected_type = 'move'
@deprecated('target_ns.id', since='20150518') def new_ns(self): @@ -361,7 +361,7 @@
"""Patrol log entry."""
- _expectedType = 'patrol' + _expected_type = 'patrol'
@property def current_id(self): @@ -471,7 +471,7 @@ if logtype is not None else OtherLogEntry.__name__) cls._logtypes[logtype] = type( - classname, bases, {'_expectedType': logtype}) + classname, bases, {'_expected_type': logtype}) return cls._logtypes[logtype]
def _createFromData(self, logdata): diff --git a/pywikibot/page.py b/pywikibot/page.py index 6241382..9b6eb22 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -12,7 +12,7 @@
""" # -# (C) Pywikibot team, 2008-2018 +# (C) Pywikibot team, 2008-2019 # # Distributed under the terms of the MIT license. # @@ -3045,8 +3045,8 @@ authors = ', '.join(self.contributingUsers()) creation_summary = message % (self.title(), authors) newtext = self.get() - for regexName in cfd_templates: - matchcfd = re.compile(r'{{%s.*?}}' % regexName, re.IGNORECASE) + for regex_name in cfd_templates: + matchcfd = re.compile(r'{{%s.*?}}' % regex_name, re.IGNORECASE) newtext = matchcfd.sub('', newtext) matchcomment = re.compile( r'<!--BEGIN CFD TEMPLATE-->.*?<!--END CFD TEMPLATE-->', diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py index 227cc41..81927e4 100644 --- a/pywikibot/pagegenerators.py +++ b/pywikibot/pagegenerators.py @@ -14,7 +14,7 @@ ¶ms; """ # -# (C) Pywikibot team, 2008-2018 +# (C) Pywikibot team, 2008-2019 # # Distributed under the terms of the MIT license. # @@ -396,7 +396,7 @@ expression does not match. """
-docuReplacements = {'¶ms;': parameterHelp} +docuReplacements = {'¶ms;': parameterHelp} # noqa: N816
# if a bot uses GeneratorFactory, the module should include the line # docuReplacements = {'¶ms;': pywikibot.pagegenerators.parameterHelp} diff --git a/pywikibot/proofreadpage.py b/pywikibot/proofreadpage.py index a075e31..5cc311b 100644 --- a/pywikibot/proofreadpage.py +++ b/pywikibot/proofreadpage.py @@ -22,7 +22,7 @@
""" # -# (C) Pywikibot team, 2015-2018 +# (C) Pywikibot team, 2015-2019 # # Distributed under the terms of the MIT license. # @@ -140,9 +140,9 @@ _MULTI_PAGE_EXT = ['djvu', 'pdf']
_PHETOOLS = 'phetools' - _googleOCR = 'googleOCR' + _GOOGLE_OCR = 'googleOCR' _OCR_CMDS = {_PHETOOLS: _OCR_CMD, - _googleOCR: _GOCR_CMD, + _GOOGLE_OCR: _GOCR_CMD, } _OCR_METHODS = list(_OCR_CMDS.keys())
diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py index 7aa8a31..0b9095d 100644 --- a/pywikibot/tools/__init__.py +++ b/pywikibot/tools/__init__.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Miscellaneous helper functions (not wiki-dependent).""" # -# (C) Pywikibot team, 2008-2018 +# (C) Pywikibot team, 2008-2019 # # Distributed under the terms of the MIT license. # @@ -37,12 +37,12 @@
if not PY2: from itertools import zip_longest - import queue as Queue + import queue StringTypes = basestring = (str,) UnicodeType = unicode = str else: from itertools import izip_longest as zip_longest - import Queue + import Queue as queue # noqa: N813 StringTypes = types.StringTypes UnicodeType = types.UnicodeType
@@ -836,7 +836,7 @@ raise RuntimeError('No generator for ThreadedGenerator to run.') self.args, self.kwargs = args, kwargs threading.Thread.__init__(self, group=group, name=name) - self.queue = Queue.Queue(qsize) + self.queue = queue.Queue(qsize) self.finished = threading.Event()
def __iter__(self): @@ -847,7 +847,7 @@ while not self.finished.isSet(): try: yield self.queue.get(True, 0.25) - except Queue.Empty: + except queue.Empty: pass except KeyboardInterrupt: self.stop() @@ -870,7 +870,7 @@ return try: self.queue.put_nowait(result) - except Queue.Full: + except queue.Full: time.sleep(0.25) continue break @@ -1076,7 +1076,7 @@ if active < n_gen and n_gen - max_cache > active: thrlist.stop_all() return - except Queue.Empty: + except queue.Empty: pass except KeyboardInterrupt: thrlist.stop_all() diff --git a/pywikibot/weblib.py b/pywikibot/weblib.py index e9b9e75..e2df994 100644 --- a/pywikibot/weblib.py +++ b/pywikibot/weblib.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Functions for manipulating external links or querying third-party sites.""" # -# (C) Pywikibot team, 2013-2018 +# (C) Pywikibot team, 2013-2019 # # Distributed under the terms of the MIT license. # @@ -10,7 +10,7 @@ import json import sys from time import sleep -import xml.etree.ElementTree as ET +from xml.etree import ElementTree
from requests.exceptions import ConnectionError as RequestsConnectionError
@@ -87,7 +87,7 @@ uri = uri + urlencode(query) xmltext = http.fetch(uri).text if 'success' in xmltext: - data = ET.fromstring(xmltext) + data = ElementTree.fromstring(xmltext) return data.find('.//webcite_url').text else: return None diff --git a/scripts/add_text.py b/scripts/add_text.py index c76daa0..31be0c3 100755 --- a/scripts/add_text.py +++ b/scripts/add_text.py @@ -57,7 +57,7 @@
# # (C) Filnik, 2007-2010 -# (C) Pywikibot team, 2007-2018 +# (C) Pywikibot team, 2007-2019 # # Distributed under the terms of the MIT license. # @@ -74,9 +74,7 @@ from pywikibot.bot_choice import QuitKeyboardInterrupt from pywikibot.tools.formatter import color_format
-docuReplacements = { - '¶ms;': pagegenerators.parameterHelp, -} +docuReplacements = {'¶ms;': pagegenerators.parameterHelp} # noqa: N816
def get_text(page, old, create): diff --git a/scripts/basic.py b/scripts/basic.py index 282c2e7..97b2a28 100755 --- a/scripts/basic.py +++ b/scripts/basic.py @@ -25,7 +25,7 @@ -summary: Set the action summary message for the edit. """ # -# (C) Pywikibot team, 2006-2018 +# (C) Pywikibot team, 2006-2019 # # Distributed under the terms of the MIT license. # @@ -39,9 +39,7 @@
# This is required for the text that is shown when you run this script # with the parameter -help. -docuReplacements = { - '¶ms;': pagegenerators.parameterHelp -} +docuReplacements = {'¶ms;': pagegenerators.parameterHelp} # noqa: N816
class BasicBot( diff --git a/scripts/capitalize_redirects.py b/scripts/capitalize_redirects.py index 59e79a8..6291cce 100755 --- a/scripts/capitalize_redirects.py +++ b/scripts/capitalize_redirects.py @@ -22,7 +22,7 @@ """ # # (C) Yrithinnd, 2006 -# (C) Pywikibot team, 2007-2018 +# (C) Pywikibot team, 2007-2019 # # Distributed under the terms of the MIT license. # @@ -39,9 +39,7 @@ MultipleSitesBot, FollowRedirectPageBot, ExistingPageBot )
-docuReplacements = { - '¶ms;': pagegenerators.parameterHelp -} +docuReplacements = {'¶ms;': pagegenerators.parameterHelp} # noqa: N816
class CapitalizeBot(MultipleSitesBot, FollowRedirectPageBot, ExistingPageBot): diff --git a/scripts/category.py b/scripts/category.py index 491c3dd..e0907d2 100755 --- a/scripts/category.py +++ b/scripts/category.py @@ -115,8 +115,8 @@ # (C) leogregianin, 2004-2008 # (C) Ben McIlwain (CydeWeys), 2006-2015 # (C) Anreas J Schwab, 2007 -# (C) xqt, 2009-2018 -# (C) Pywikibot team, 2008-2018 +# (C) xqt, 2009-2019 +# (C) Pywikibot team, 2008-2019 # # Distributed under the terms of the MIT license. # @@ -151,9 +151,7 @@
# This is required for the text that is shown when you run this script # with the parameter -help. -docuReplacements = { - '¶ms;': pagegenerators.parameterHelp -} +docuReplacements = {'¶ms;': pagegenerators.parameterHelp} # noqa: N816
cfd_templates = { 'wikipedia': { diff --git a/scripts/category_redirect.py b/scripts/category_redirect.py index 8aecefc..1235bd3 100755 --- a/scripts/category_redirect.py +++ b/scripts/category_redirect.py @@ -23,14 +23,13 @@
""" # -# (C) Pywikibot team, 2008-2018 +# (C) Pywikibot team, 2008-2019 # # Distributed under the terms of the MIT license. # from __future__ import absolute_import, division, unicode_literals
import re -import sys import time
from datetime import timedelta @@ -39,11 +38,12 @@
from pywikibot import i18n, pagegenerators, config from pywikibot.bot import SingleSiteBot +from pywikibot.tools import PY2
-if sys.version_info[0] > 2: - import pickle as cPickle +if PY2: + import cPickle as pickle # noqa: N813 else: - import cPickle + import pickle
class CategoryRedirectBot(SingleSiteBot): @@ -301,12 +301,12 @@ .format(self.site.dbName())) try: with open(datafile, 'rb') as inp: - record = cPickle.load(inp) + record = pickle.load(inp) except IOError: record = {} if record: with open(datafile + '.bak', 'wb') as f: - cPickle.dump(record, f, protocol=config.pickle_protocol) + pickle.dump(record, f, protocol=config.pickle_protocol) # regex to match soft category redirects # TODO: enhance and use textlib._MultiTemplateMatchBuilder # note that any templates containing optional "category:" are @@ -476,7 +476,7 @@ pass
with open(datafile, 'wb') as f: - cPickle.dump(record, f, protocol=config.pickle_protocol) + pickle.dump(record, f, protocol=config.pickle_protocol)
self.log_text.sort() self.problems.sort() diff --git a/scripts/cfd.py b/scripts/cfd.py index e11e3c3..6ba2ad1 100755 --- a/scripts/cfd.py +++ b/scripts/cfd.py @@ -13,7 +13,7 @@ """ # # (C) Ben McIlwain, 2008 -# (C) Pywikibot team, 2009-2018 +# (C) Pywikibot team, 2009-2019 # # Distributed under the terms of the MIT license. # @@ -32,7 +32,7 @@ # A list of templates that are used on category pages as part of the CFD # process that contain information such as the link to the per-day discussion # page. -cfdTemplates = ['Cfd full', 'Cfr full'] +cfd_templates = ['Cfd full', 'Cfr full']
# Regular expression declarations # See the en-wiki CFD working page at @@ -221,7 +221,7 @@ # Try to parse day link from CFD template parameters. templates = page.templatesWithParams() for template, params in templates: - if template.title() in cfdTemplates: + if template.title() in cfd_templates: period = {'year': None, 'day': None, 'month': None} for param in params: name, _, val = param.partition('=') diff --git a/scripts/claimit.py b/scripts/claimit.py index 348c5e5..b70205e 100755 --- a/scripts/claimit.py +++ b/scripts/claimit.py @@ -48,7 +48,7 @@ """ # # (C) Legoktm, 2013 -# (C) Pywikibot team, 2013-2018 +# (C) Pywikibot team, 2013-2019 # # Distributed under the terms of the MIT license. # @@ -59,9 +59,7 @@
# This is required for the text that is shown when you run this script # with the parameter -help or without parameters. -docuReplacements = { - '¶ms;': pagegenerators.parameterHelp, -} +docuReplacements = {'¶ms;': pagegenerators.parameterHelp} # noqa: N816
class ClaimRobot(WikidataBot): diff --git a/scripts/commons_link.py b/scripts/commons_link.py index f23c778..d961deb 100755 --- a/scripts/commons_link.py +++ b/scripts/commons_link.py @@ -24,7 +24,7 @@ """ # # (C) Leonardo Gregianin, 2006 -# (C) Pywikibot team, 2007-2018 +# (C) Pywikibot team, 2007-2019 # # Distributed under the terms of the MIT license. # @@ -39,9 +39,7 @@
from pywikibot import textlib, pagegenerators, i18n, Bot
-docuReplacements = { - '¶ms;': pagegenerators.parameterHelp, -} +docuReplacements = {'¶ms;': pagegenerators.parameterHelp} # noqa: N816
class CommonsLinkBot(Bot): diff --git a/scripts/coordinate_import.py b/scripts/coordinate_import.py index a82a59b..d859359 100755 --- a/scripts/coordinate_import.py +++ b/scripts/coordinate_import.py @@ -29,7 +29,7 @@ """ # # (C) Multichill, 2014 -# (C) Pywikibot team, 2013-2018 +# (C) Pywikibot team, 2013-2019 # # Distributed under the terms of MIT License. # @@ -39,7 +39,7 @@ from pywikibot import pagegenerators, WikidataBot from pywikibot.exceptions import CoordinateGlobeUnknownException
-docuReplacements = {'¶ms;': pagegenerators.parameterHelp} +docuReplacements = {'¶ms;': pagegenerators.parameterHelp} # noqa: N816
class CoordImportRobot(WikidataBot): diff --git a/scripts/delete.py b/scripts/delete.py index 9ef5803..44c3324 100755 --- a/scripts/delete.py +++ b/scripts/delete.py @@ -50,7 +50,7 @@ python pwb.py delete -cat:"To delete" -always """ # -# (C) Pywikibot team, 2013-2018 +# (C) Pywikibot team, 2013-2019 # # Distributed under the terms of the MIT license. # @@ -70,9 +70,7 @@
# This is required for the text that is shown when you run this script # with the parameter -help. -docuReplacements = { - '¶ms;': pagegenerators.parameterHelp, -} +docuReplacements = {'¶ms;': pagegenerators.parameterHelp} # noqa: N816
class PageWithRefs(Page): diff --git a/scripts/fixing_redirects.py b/scripts/fixing_redirects.py index 8a833ab..3c45aba 100755 --- a/scripts/fixing_redirects.py +++ b/scripts/fixing_redirects.py @@ -13,7 +13,7 @@
""" # -# (C) Pywikibot team, 2004-2018 +# (C) Pywikibot team, 2004-2019 # # Distributed under the terms of the MIT license. # @@ -31,9 +31,7 @@
# This is required for the text that is shown when you run this script # with the parameter -help. -docuReplacements = { - '¶ms;': pagegenerators.parameterHelp, -} +docuReplacements = {'¶ms;': pagegenerators.parameterHelp} # noqa: N816
# Featured articles categories featured_articles = 'Q4387444' diff --git a/scripts/followlive.py b/scripts/followlive.py index 0473dca..ed79bc6 100644 --- a/scripts/followlive.py +++ b/scripts/followlive.py @@ -15,7 +15,7 @@ ¶ms; """ # -# (C) Pywikibot team, 2005-2018 +# (C) Pywikibot team, 2005-2019 # # Distributed under the terms of the MIT license. # @@ -32,9 +32,7 @@
# This is required for the text that is shown when you run this script # with the parameter -help. -docuReplacements = { - '¶ms;': pagegenerators.parameterHelp -} +docuReplacements = {'¶ms;': pagegenerators.parameterHelp} # noqa: N816
# templates that can be used followed by the message used as comment # templates contains list of languages code diff --git a/scripts/illustrate_wikidata.py b/scripts/illustrate_wikidata.py index 58378e0..d866d69 100755 --- a/scripts/illustrate_wikidata.py +++ b/scripts/illustrate_wikidata.py @@ -15,7 +15,7 @@ """ # # (C) Multichill, 2014 -# (C) Pywikibot team, 2013-2018 +# (C) Pywikibot team, 2013-2019 # # Distributed under the terms of MIT License. # @@ -25,7 +25,7 @@
from pywikibot import pagegenerators, WikidataBot
-docuReplacements = {'¶ms;': pywikibot.pagegenerators.parameterHelp} +docuReplacements = {'¶ms;': pagegenerators.parameterHelp} # noqa: N816
class IllustrateRobot(WikidataBot): diff --git a/scripts/interwiki.py b/scripts/interwiki.py index 725cffc..334cb03 100755 --- a/scripts/interwiki.py +++ b/scripts/interwiki.py @@ -340,8 +340,8 @@ # (C) Rob W.W. Hooft, 2003 # (C) Daniel Herding, 2004 # (C) Yuri Astrakhan, 2005-2006 -# (C) xqt, 2009-2018 -# (C) Pywikibot team, 2007-2018 +# (C) xqt, 2009-2019 +# (C) Pywikibot team, 2007-2019 # # Distributed under the terms of the MIT license. # @@ -453,7 +453,7 @@ lacklanguage = None minlinks = 0 quiet = False - restoreAll = False + restore_all = False asynchronous = False summary = '' repository = False @@ -2187,7 +2187,7 @@ else: break # If we have a few, getting the home language is a good thing. - if not self.conf.restoreAll: + if not self.conf.restore_all: try: if self.counts[pywikibot.Site()] > 4: return pywikibot.Site() @@ -2450,8 +2450,8 @@ else: newPages = 100 elif arg.startswith('-restore'): - iwconf.restoreAll = arg[9:].lower() == 'all' - optRestore = not iwconf.restoreAll + iwconf.restore_all = arg[9:].lower() == 'all' + optRestore = not iwconf.restore_all elif arg == '-continue': optContinue = True elif arg == '-hintsonly': @@ -2499,7 +2499,7 @@ hintlessPageGen = pagegenerators.NewpagesPageGenerator(total=newPages, namespaces=ns)
- elif optRestore or optContinue or iwconf.restoreAll: + elif optRestore or optContinue or iwconf.restore_all: dumpFileName = pywikibot.config.datafilepath( 'data', 'interwiki-dumps', @@ -2552,7 +2552,7 @@ bot.add(singlePage, hints=iwconf.hints)
try: - append = not (optRestore or optContinue or iwconf.restoreAll) + append = not (optRestore or optContinue or iwconf.restore_all) bot.run() except KeyboardInterrupt: dumpFileName = bot.dump(append) diff --git a/scripts/interwikidata.py b/scripts/interwikidata.py index 6a4c71a..51475d8 100644 --- a/scripts/interwikidata.py +++ b/scripts/interwikidata.py @@ -23,7 +23,7 @@ -summary: Use your own edit summary for cleaning the page. """
-# (C) Pywikibot team, 2015-2018 +# (C) Pywikibot team, 2015-2019 # # Distributed under the terms of the MIT license. # @@ -36,9 +36,7 @@
# This is required for the text that is shown when you run this script # with the parameter -help. -docuReplacements = { - '¶ms;': pagegenerators.parameterHelp, -} +docuReplacements = {'¶ms;': pagegenerators.parameterHelp} # noqa: N816
# Allowed namespaces. main, project, template, category namespaces = [0, 4, 10, 14] diff --git a/scripts/listpages.py b/scripts/listpages.py index 8b23040..014abda 100755 --- a/scripts/listpages.py +++ b/scripts/listpages.py @@ -88,7 +88,7 @@ ¶ms; """ # -# (C) Pywikibot team, 2008-2018 +# (C) Pywikibot team, 2008-2019 # # Distributed under the terms of the MIT license. # @@ -101,7 +101,7 @@ from pywikibot import config2 as config, i18n from pywikibot.pagegenerators import GeneratorFactory, parameterHelp
-docuReplacements = {'¶ms;': parameterHelp} +docuReplacements = {'¶ms;': parameterHelp} # noqa: N816
class Formatter(object): diff --git a/scripts/lonelypages.py b/scripts/lonelypages.py index 8177149..e46b311 100755 --- a/scripts/lonelypages.py +++ b/scripts/lonelypages.py @@ -34,7 +34,7 @@ # # (C) Pietrodn, it.wiki 2006-2007 # (C) Filnik, it.wiki 2007 -# (C) Pywikibot team, 2008-2018 +# (C) Pywikibot team, 2008-2019 # # Distributed under the terms of the MIT license. # @@ -49,9 +49,7 @@
# This is required for the text that is shown when you run this script # with the parameter -help. -docuReplacements = { - '¶ms;': pagegenerators.parameterHelp, -} +docuReplacements = {'¶ms;': pagegenerators.parameterHelp} # noqa: N816
class OrphanTemplate(object): diff --git a/scripts/movepages.py b/scripts/movepages.py index 0fb5ba7..24b13e2 100755 --- a/scripts/movepages.py +++ b/scripts/movepages.py @@ -34,7 +34,7 @@ # # (C) Leonardo Gregianin, 2006 # (C) Andreas J. Schwab, 2007 -# (C) Pywikibot team, 2006-2018 +# (C) Pywikibot team, 2006-2019 # # Distributed under the terms of the MIT license. # @@ -52,9 +52,7 @@
# This is required for the text that is shown when you run this script # with the parameter -help. -docuReplacements = { - '¶ms;': pagegenerators.parameterHelp, -} +docuReplacements = {'¶ms;': pagegenerators.parameterHelp} # noqa: N816
class MovePagesBot(MultipleSitesBot): diff --git a/scripts/ndashredir.py b/scripts/ndashredir.py index 7339090..8dbef31 100644 --- a/scripts/ndashredir.py +++ b/scripts/ndashredir.py @@ -27,7 +27,7 @@ """ # # (C) Bináris, 2012 -# (C) Pywikibot team, 2012-2018 +# (C) Pywikibot team, 2012-2019 # # Distributed under the terms of the MIT license. # @@ -43,9 +43,7 @@
# This is required for the text that is shown when you run this script # with the parameter -help. -docuReplacements = { - '¶ms;': pagegenerators.parameterHelp -} +docuReplacements = {'¶ms;': pagegenerators.parameterHelp} # noqa: N816
class DashRedirectBot( diff --git a/scripts/piper.py b/scripts/piper.py index 97898ea..9686dea 100755 --- a/scripts/piper.py +++ b/scripts/piper.py @@ -29,7 +29,7 @@ the order which they are given """ # -# (C) Pywikibot team, 2008-2018 +# (C) Pywikibot team, 2008-2019 # # Distributed under the terms of the MIT license. # @@ -48,9 +48,7 @@
# This is required for the text that is shown when you run this script # with the parameter -help. -docuReplacements = { - '¶ms;': pagegenerators.parameterHelp -} +docuReplacements = {'¶ms;': pagegenerators.parameterHelp} # noqa: N816
class PiperBot(MultipleSitesBot, ExistingPageBot, NoRedirectPageBot, diff --git a/scripts/protect.py b/scripts/protect.py index 66988f8..60d7789 100755 --- a/scripts/protect.py +++ b/scripts/protect.py @@ -53,7 +53,7 @@ # Written by https://it.wikisource.org/wiki/Utente:Qualc1 # Created by modifying delete.py # -# (C) Pywikibot team, 2008-2018 +# (C) Pywikibot team, 2008-2019 # # Distributed under the terms of the MIT license. # @@ -66,9 +66,7 @@
# This is required for the text that is shown when you run this script # with the parameter -help. -docuReplacements = { - '¶ms;': pagegenerators.parameterHelp, -} +docuReplacements = {'¶ms;': pagegenerators.parameterHelp} # noqa: N816
class ProtectionRobot(SingleSiteBot): diff --git a/scripts/revertbot.py b/scripts/revertbot.py index cf4d0b6..83f79fb 100755 --- a/scripts/revertbot.py +++ b/scripts/revertbot.py @@ -36,7 +36,7 @@ """ # # (C) Bryan Tong Minh, 2008 -# (C) Pywikibot team, 2008-2018 +# (C) Pywikibot team, 2008-2019 # # Ported by Geoffrey "GEOFBOT" Mon - User:Sn1per # for Google Code-In 2013 @@ -135,7 +135,8 @@ pywikibot.output(msg)
-myRevertBot = BaseRevertBot # for compatibility only +# for compatibility only +myRevertBot = BaseRevertBot # noqa: N816
def main(*args): diff --git a/scripts/selflink.py b/scripts/selflink.py index d760fad..531974c 100755 --- a/scripts/selflink.py +++ b/scripts/selflink.py @@ -11,7 +11,7 @@ ATTENTION: Use this with care! """ # -# (C) Pywikibot team, 2006-2018 +# (C) Pywikibot team, 2006-2019 # # Distributed under the terms of the MIT license. # @@ -25,9 +25,7 @@
# This is required for the text that is shown when you run this script # with the parameter -help. -docuReplacements = { - '¶ms;': parameterHelp, -} +docuReplacements = {'¶ms;': parameterHelp} # noqa: N816
class _BoldChoice(Choice): diff --git a/scripts/spamremove.py b/scripts/spamremove.py index 2ebd7f3..c5ed4d1 100755 --- a/scripts/spamremove.py +++ b/scripts/spamremove.py @@ -27,7 +27,7 @@ ¶ms; """ # -# (C) Pywikibot team, 2007-2018 +# (C) Pywikibot team, 2007-2019 # # Distributed under the terms of the MIT license. # @@ -41,9 +41,7 @@ from pywikibot.editor import TextEditor from pywikibot.tools.formatter import color_format
-docuReplacements = { - '¶ms;': pagegenerators.parameterHelp -} +docuReplacements = {'¶ms;': pagegenerators.parameterHelp} # noqa: N816
class SpamRemoveBot(SingleSiteBot, ExistingPageBot, NoRedirectPageBot, diff --git a/scripts/surnames_redirects.py b/scripts/surnames_redirects.py index 21ef0d1..97ab8a0 100755 --- a/scripts/surnames_redirects.py +++ b/scripts/surnames_redirects.py @@ -16,7 +16,7 @@ Example: "python pwb.py surnames_redirects -start:B" """ # -# (C) Pywikibot team, 2017-2018 +# (C) Pywikibot team, 2017-2019 # # Distributed under the terms of the MIT license. # @@ -28,7 +28,7 @@ from pywikibot import i18n, pagegenerators from pywikibot.bot import FollowRedirectPageBot, ExistingPageBot
-docuReplacements = {'¶ms;': pagegenerators.parameterHelp} +docuReplacements = {'¶ms;': pagegenerators.parameterHelp} # noqa: N816
class SurnamesBot(ExistingPageBot, FollowRedirectPageBot): diff --git a/scripts/table2wiki.py b/scripts/table2wiki.py index 8cc47ad..5926835 100644 --- a/scripts/table2wiki.py +++ b/scripts/table2wiki.py @@ -40,7 +40,7 @@ """ # # (C) 2003 Thomas R. Koll, tomk32@tomk32.de -# (C) Pywikibot team, 2003-2018 +# (C) Pywikibot team, 2003-2019 # # Distributed under the terms of the MIT license. # @@ -63,9 +63,7 @@
# This is required for the text that is shown when you run this script # with the parameter -help. -docuReplacements = { - '¶ms;': pagegenerators.parameterHelp, -} +docuReplacements = {'¶ms;': pagegenerators.parameterHelp} # noqa: N816
class TableXmlDumpPageGenerator(object): diff --git a/scripts/touch.py b/scripts/touch.py index edd69f8..7f5cd42 100755 --- a/scripts/touch.py +++ b/scripts/touch.py @@ -26,7 +26,7 @@
""" # -# (C) Pywikibot team, 2009-2018 +# (C) Pywikibot team, 2009-2019 # # Distributed under the terms of the MIT license. # @@ -40,7 +40,7 @@ from pywikibot.exceptions import ArgumentDeprecationWarning from pywikibot.tools import issue_deprecation_warning
-docuReplacements = {'¶ms;': pagegenerators.parameterHelp} +docuReplacements = {'¶ms;': pagegenerators.parameterHelp} # noqa: N816
class TouchBot(MultipleSitesBot): diff --git a/scripts/transferbot.py b/scripts/transferbot.py index a858e72..86e6e8a 100755 --- a/scripts/transferbot.py +++ b/scripts/transferbot.py @@ -37,7 +37,7 @@ """ # # (C) Merlijn van Deen, 2014 -# (C) Pywikibot team, 2014-2018 +# (C) Pywikibot team, 2014-2019 # # Distributed under the terms of the MIT license. # @@ -46,9 +46,7 @@ import pywikibot from pywikibot import pagegenerators
-docuReplacements = { - '¶ms;': pagegenerators.parameterHelp, -} +docuReplacements = {'¶ms;': pagegenerators.parameterHelp} # noqa: N816
class WikiTransferException(Exception): diff --git a/scripts/weblinkchecker.py b/scripts/weblinkchecker.py index 6aee186..b50a370 100755 --- a/scripts/weblinkchecker.py +++ b/scripts/weblinkchecker.py @@ -99,7 +99,7 @@ """ # # (C) Daniel Herding, 2005 -# (C) Pywikibot team, 2005-2018 +# (C) Pywikibot team, 2005-2019 # # Distributed under the terms of the MIT license. # @@ -151,9 +151,7 @@ import urllib import urlparse
-docuReplacements = { - '¶ms;': pagegenerators.parameterHelp -} +docuReplacements = {'¶ms;': pagegenerators.parameterHelp} # noqa: N816
ignorelist = [ # Officially reserved for testing, documentation, etc. in diff --git a/scripts/welcome.py b/scripts/welcome.py index d192cc1..26a12ca 100755 --- a/scripts/welcome.py +++ b/scripts/welcome.py @@ -160,8 +160,8 @@ # (C) Filnik, 2007-2011 # (C) Daniel Herding, 2007 # (C) Alex Shih-Han Lin, 2009-2010 -# (C) xqt, 2009-2018 -# (C) Pywikibot team, 2008-2018 +# (C) xqt, 2009-2019 +# (C) Pywikibot team, 2008-2019 # # Distributed under the terms of the MIT license. # @@ -171,7 +171,6 @@ from datetime import timedelta import locale import re -import sys from textwrap import fill import time
@@ -181,7 +180,12 @@
from pywikibot import config, i18n from pywikibot.tools.formatter import color_format -from pywikibot.tools import issue_deprecation_warning, UnicodeType +from pywikibot.tools import issue_deprecation_warning, PY2, UnicodeType + +if PY2: + import cPickle as pickle # noqa: N813 +else: + import pickle
locale.setlocale(locale.LC_ALL, '')
@@ -1011,13 +1015,9 @@ # If there is the savedata, the script must save the number_user. if globalvar.randomSign and globalvar.saveSignIndex and \ bot.welcomed_users: - if sys.version_info[0] > 2: - import pickle as cPickle - else: - import cPickle with open(filename, 'wb') as f: - cPickle.dump(bot.welcomed_users, f, - protocol=config.pickle_protocol) + pickle.dump(bot.welcomed_users, f, + protocol=config.pickle_protocol)
if __name__ == '__main__': diff --git a/scripts/wikisourcetext.py b/scripts/wikisourcetext.py index 7d60767..9afba7a 100644 --- a/scripts/wikisourcetext.py +++ b/scripts/wikisourcetext.py @@ -54,7 +54,7 @@ -always don't bother asking to confirm any of the changes. """ # -# (C) Pywikibot team, 2016-2018 +# (C) Pywikibot team, 2016-2019 # # Distributed under the terms of the MIT license. # @@ -62,7 +62,6 @@
import collections import itertools -import sys import threading import time
@@ -72,11 +71,12 @@
from pywikibot.bot import SingleSiteBot from pywikibot.proofreadpage import IndexPage, ProofreadPage +from pywikibot.tools import PY2
-if sys.version_info[0] > 2: +if not PY2: import queue else: - import Queue as queue + import Queue as queue # noqa: N813
class UploadTextBot(SingleSiteBot): diff --git a/tests/api_tests.py b/tests/api_tests.py index 76d5fc3..24464ff 100644 --- a/tests/api_tests.py +++ b/tests/api_tests.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """API test module.""" # -# (C) Pywikibot team, 2007-2018 +# (C) Pywikibot team, 2007-2019 # # Distributed under the terms of the MIT license. # @@ -462,7 +462,7 @@ self.assertEqual(value, '')
@patch.object(pywikibot, 'warning') # ignore several warnings - def test_old_mode(self, _): + def test_old_mode(self, *args): """Test the old mode explicitly.""" site = self.get_site() pi = api.ParamInfo(site, modules_only_mode=False) diff --git a/tests/aspects.py b/tests/aspects.py index 5fcf8db..231d81e 100644 --- a/tests/aspects.py +++ b/tests/aspects.py @@ -265,7 +265,7 @@ gen_titles = self._get_gen_titles(gen, len(titles), site) self.assertCountEqual(gen_titles, titles)
- assertPagelistTitles = assertPageTitlesEqual + assertPagelistTitles = assertPageTitlesEqual # noqa: N815
def assertAPIError(self, code, info=None, callable_obj=None, *args, **kwargs): diff --git a/tests/dry_site_tests.py b/tests/dry_site_tests.py index 441fe50..f9157d4 100644 --- a/tests/dry_site_tests.py +++ b/tests/dry_site_tests.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Tests against a fake Site object.""" # -# (C) Pywikibot team, 2012-2018 +# (C) Pywikibot team, 2012-2019 # # Distributed under the terms of the MIT license. # @@ -153,7 +153,7 @@ self.assertEqual(self._logged_in_as, 'sysop')
# Test that setUp is actually called between each test - testMockInTestReset = testMockInTest + testMockInTestReset = testMockInTest # noqa: N815
@must_be('sysop') def call_this_sysop_req_function(self, *args, **kwargs): diff --git a/tests/flow_thanks_tests.py b/tests/flow_thanks_tests.py index 7eb86ca..1a37feb6 100644 --- a/tests/flow_thanks_tests.py +++ b/tests/flow_thanks_tests.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Tests for thanks-related code.""" # -# (C) Pywikibot team, 2016-2018 +# (C) Pywikibot team, 2016-2019 # # Distributed under the terms of the MIT license. # @@ -48,9 +48,12 @@ post.thank() log_entries = site.logevents(logtype='thanks', total=5, page=user, start=before_time, reverse=True) - for __ in log_entries: + try: + next(iter(log_entries)) + except StopIteration: + found_log = False + else: found_log = True - break self.assertTrue(found_log)
def test_self_thank(self): diff --git a/tests/logentry_tests.py b/tests/logentry_tests.py index 264a305..348701a 100644 --- a/tests/logentry_tests.py +++ b/tests/logentry_tests.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Test logentries module.""" # -# (C) Pywikibot team, 2015-2018 +# (C) Pywikibot team, 2015-2019 # # Distributed under the terms of the MIT license. # @@ -68,7 +68,7 @@ """Test a single logtype entry.""" logentry = self._get_logentry(logtype) self.assertIn(logtype, logentry.__class__.__name__.lower()) - self.assertEqual(logentry._expectedType, logtype) + self.assertEqual(logentry._expected_type, logtype) if logtype not in LogEntryFactory._logtypes: self.assertIsInstance(logentry, OtherLogEntry) if self.site_key == 'old': diff --git a/tests/thanks_tests.py b/tests/thanks_tests.py index b8b403c..051a1a0 100644 --- a/tests/thanks_tests.py +++ b/tests/thanks_tests.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Tests for thanks-related code.""" # -# (C) Pywikibot team, 2016-2018 +# (C) Pywikibot team, 2016-2019 # # Distributed under the terms of the MIT license. # @@ -47,9 +47,12 @@ Revision._thank(revid, site, source='pywikibot test') log_entries = site.logevents(logtype='thanks', total=5, page=user, start=before_time, reverse=True) - for __ in log_entries: + try: + next(iter(log_entries)) + except StopIteration: + found_log = False + else: found_log = True - break self.assertTrue(found_log)
def test_self_thank(self): diff --git a/tests/tk_tests.py b/tests/tk_tests.py index 1606b7a..844d238 100644 --- a/tests/tk_tests.py +++ b/tests/tk_tests.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Tests for the Tk UI.""" # -# (C) Pywikibot team, 2008-2018 +# (C) Pywikibot team, 2008-2019 # # Distributed under the terms of the MIT license. # @@ -16,9 +16,9 @@
if os.environ.get('PYWIKIBOT_TEST_GUI', '0') == '1': if not PY2: - import tkinter as Tkinter + import tkinter else: - import Tkinter + import Tkinter as tkinter # noqa: N813 from pywikibot.userinterfaces.gui import EditBoxWindow, Tkdialog
@@ -59,8 +59,8 @@
def testTkinter(self): """Test Tkinter window.""" - root = Tkinter.Tk() - root.resizable(width=Tkinter.FALSE, height=Tkinter.FALSE) + root = tkinter.Tk() + root.resizable(width=tkinter.FALSE, height=tkinter.FALSE) root.title('pywikibot GUI') page = pywikibot.Page(pywikibot.Site(), 'Main Page') content = page.get() diff --git a/tox.ini b/tox.ini index 506146b..9ef8281 100644 --- a/tox.ini +++ b/tox.ini @@ -118,11 +118,11 @@ # H404: docstring multiline start # H405: docstring summary line # H301: Do not import more than one module per line; Pywikibot uses H306 (Alphabetically order your imports by the full module path) -# W503: line break before binary operator; against current PEP 8 recommendation -# W504 line break after binary operator # P101: format string does contain unindexed parameters # P102: docstring does contain unindexed parameters # P103: other string does contain unindexed parameters +# W503: line break before binary operator; against current PEP 8 recommendation +# W504 line break after binary operator
# The following are to be fixed # D102: Missing docstring in public method @@ -130,13 +130,15 @@ # N802: function name should be lowercase # N803: argument name should be lowercase # N806: variable in function should be lowercase +# N815: mixedCase variable in class scope +# N816: mixedCase variable in global scope
# Errors occured after upgrade to pydocstyle 2.0.0 (T164142) # D401: First line should be in imperative mood; try rephrasing # D413: Missing blank line after last section # D412: No blank lines allowed between a section header and its content
-ignore = D105,D211,FI12,FI13,FI15,FI16,FI17,FI5,H101,H236,H301,H404,H405,H903,D401,D413,D412,P101,P102,P103,W503,W504 +ignore = D105,D211,D401,D413,D412,FI12,FI13,FI15,FI16,FI17,FI5,H101,H236,H301,H404,H405,H903,P101,P102,P103,W503,W504 exclude = .tox,.git,./*.egg,ez_setup.py,build,externals,user-config.py,./scripts/i18n/*,scripts/userscripts/* min-version = 2.7 accept-encodings = utf-8 @@ -146,16 +148,17 @@ generate_family_file.py : T001 pwb.py : T001 # pydocstyle cannot handle multiple __all__ variables - pywikibot/__init__.py : N806, N802 + pywikibot/__init__.py : N802, N806, N815, N816 pywikibot/_wbtypes.py: N802 pywikibot/backports.py: N802 - pywikibot/bot.py: N802 + pywikibot/bot.py: N802, N815, N816 pywikibot/compat/catlib.py : N803 pywikibot/compat/query.py: N802 - pywikibot/cosmetic_changes.py : N803, N806, N802 + pywikibot/config2.py: N816 + pywikibot/cosmetic_changes.py : N802, N803, N806, N816 pywikibot/data/api.py : N806, N802 pywikibot/data/sparql.py: N802 - pywikibot/date.py : N803, N806, N802 + pywikibot/date.py : N802, N803, N806, N816 pywikibot/echo.py: N802 pywikibot/editor.py : N803, N806 # __dict__ used in a discouraged manner @@ -165,61 +168,65 @@ pywikibot/families/* : D102 pywikibot/families/strategy_family.py: N802 pywikibot/families/wowwiki_family.py: N802 - pywikibot/family.py : E241, N803, N806, N802 + pywikibot/family.py : E241, N802, N803, N806, N815 pywikibot/fixes.py : E241 pywikibot/flow.py: N802 pywikibot/interwiki_graph.py : N803, N806, N802 pywikibot/logentries.py: N802 pywikibot/logging.py : N803 - pywikibot/login.py: N802 + pywikibot/login.py: N802, N816 pywikibot/page.py: N802 - pywikibot/pagegenerators.py : N803, N806, N802 - pywikibot/site.py: N802 + pywikibot/pagegenerators.py : N802, N803, N806, N816 + pywikibot/site.py: N802, N815 pywikibot/specialbots.py : N803, N806, N802 - pywikibot/textlib.py : N801, N803, N806, N802 + pywikibot/textlib.py : N801, N802, N803, N806, N816 pywikibot/throttle.py: N802 pywikibot/tools/_logging.py: N802 pywikibot/tools/ip.py : N803, N802 pywikibot/userinterfaces/cgi_interface.py : N803 pywikibot/userinterfaces/gui.py : N812, N803, N806, N802 pywikibot/userinterfaces/terminal_interface.py : N814 - pywikibot/userinterfaces/terminal_interface_base.py : N803, N806, N802 - pywikibot/userinterfaces/terminal_interface_unix.py : E241, N806 - pywikibot/userinterfaces/terminal_interface_win32.py : E241 + pywikibot/userinterfaces/terminal_interface_base.py : N802, N803, N806, N816 + pywikibot/userinterfaces/terminal_interface_unix.py : E241, N806, N816 + pywikibot/userinterfaces/terminal_interface_win32.py : E241, N816 pywikibot/userinterfaces/transliteration.py : N801 pywikibot/userinterfaces/win32_unicode.py : N801, N812, T001, N803, N806 pywikibot/weblib.py: N802 pywikibot/xmlreader.py : N803, N806, N802 scripts/add_text.py : N803, N806 scripts/archive/featured.py : D102, D103, N802 - scripts/blockpageschecker.py : N803, N806, N802 - scripts/casechecker.py : N803, N806, N802 + scripts/blockpageschecker.py : N802, N803, N806, N816 + scripts/casechecker.py : N802, N803, N806, N815 scripts/category.py : N803, N806, N802 scripts/category_redirect.py : N803, N806, N802 scripts/cfd.py : N803, N806, N802 - scripts/checkimages.py : N801, N803, N806, N802 - scripts/commonscat.py : N803, N806, N802 + scripts/checkimages.py : N801, N802, N803, N806, N816 + scripts/clean_sandbox.py : N815, N816 + scripts/commonscat.py : N802, N803, N806, N816 + scripts/cosmetic_changes.py : N816 scripts/data_ingestion.py : N803, N806, N802 scripts/fixing_redirects.py : N803, N806 scripts/flickrripper.py : N803, N806, N802 scripts/freebasemappingupload.py: N802 - scripts/harvest_template.py : N802 - scripts/imagecopy.py : N801, N803, N806, N802 - scripts/imagecopy_self.py : N801, N803, N806, N802 + scripts/harvest_template.py : N802, N815, N816 + scripts/imagecopy.py : N801, N802, N803, N806, N816 + scripts/imagecopy_self.py : N801, N802, N803, N806, N816 scripts/imagerecat.py : N803, N806, N802 - scripts/imagetransfer.py : N803, N806, N802 - scripts/imageuncat.py: N802 - scripts/interwiki.py : N803, N806, N802 - scripts/isbn.py : N803, N806, N802 + scripts/imagetransfer.py : N802, N803, N806, N816 + scripts/imageuncat.py: N802, N816 + scripts/interwiki.py : N802, N803, N806, N816 + scripts/isbn.py : N802, N803, N806, N816 scripts/maintenance/* : T001 + scripts/maintenance/download_dump.py : N815 scripts/match_images.py : N803, N806 - scripts/misspelling.py : N803, N806, N802 + scripts/misspelling.py : N802, N803, N806, N815 scripts/movepages.py : N803, N806, N802 - scripts/noreferences.py : N803, N806, N802 - scripts/nowcommons.py : N803, N806, N802 - scripts/redirect.py : N803, N806 - scripts/reflinks.py: N802 - scripts/replace.py : N803, N806, N802 + scripts/noreferences.py : N802, N803, N806, N816 + scripts/nowcommons.py : N802, N803, N806, N816 + scripts/pagefromfile.py : N815 + scripts/redirect.py : N803, N806, N815 + scripts/reflinks.py: N802, N816 + scripts/replace.py : N802, N803, N806, N816 scripts/script_wui.py : D102, N806, N802 scripts/solve_disambiguation.py : N803, N806, N802 scripts/table2wiki.py: N802 @@ -227,7 +234,7 @@ scripts/unlink.py : N803 scripts/watchlist.py : N803, N802 scripts/weblinkchecker.py : N803, N806, N802 - scripts/welcome.py: N802 + scripts/welcome.py: N802, N815 setup.py : T001 tests/* : N813 tests/api_tests.py: N802
pywikibot-commits@lists.wikimedia.org