jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/395483 )
Change subject: Migrate from flake8-putty to flake8-per-file-ignores
......................................................................
Migrate from flake8-putty to flake8-per-file-ignores
This will allow us to use flake8 3 and its new features.
- flake8-per-file-ignores is not fully compatible with flake8-putty. Update
tox.ini accordingly.
- Fix the new E722 errors (do not use bare except) by using `Exception`.
- Replace all `flake8: disable=X` inline markers with `noqa:X`. This is a new
feature in flake8 3 and there is no need to rely on flake8-putty for it
anymore.[1]
[1]:
http://flake8.pycqa.org/en/3.1.1/user/ignoring-errors.html
Change-Id: I6116089cb0b332f8dbd0cc454b0b02d7f919af2a
---
M generate_user_files.py
M pwb.py
M pywikibot/__init__.py
M pywikibot/config2.py
M pywikibot/data/api.py
M pywikibot/date.py
M pywikibot/logentries.py
M pywikibot/logging.py
M pywikibot/page.py
M pywikibot/pagegenerators.py
M pywikibot/proofreadpage.py
M pywikibot/site.py
M pywikibot/tools/__init__.py
M pywikibot/tools/djvu.py
M pywikibot/tools/ip.py
M pywikibot/userinterfaces/gui.py
M pywikibot/version.py
M scripts/casechecker.py
M scripts/category.py
M scripts/category_redirect.py
M scripts/flickrripper.py
M scripts/followlive.py
M scripts/interwiki.py
M scripts/maintenance/cache.py
M scripts/maintenance/make_i18n_dict.py
M scripts/makecat.py
M scripts/noreferences.py
M scripts/patrol.py
M scripts/script_wui.py
M scripts/weblinkchecker.py
M tests/replacebot_tests.py
M tests/tools_tests.py
M tox.ini
33 files changed, 95 insertions(+), 87 deletions(-)
Approvals:
jenkins-bot: Verified
Xqt: Looks good to me, approved
diff --git a/generate_user_files.py b/generate_user_files.py
index 4de8a47..faf7cda 100755
--- a/generate_user_files.py
+++ b/generate_user_files.py
@@ -295,10 +295,10 @@
config_text=config_text))
pywikibot.output(u"'%s' written." % _fnc)
- except:
+ except Exception:
try:
os.remove(_fnc)
- except:
+ except Exception:
pass
raise
diff --git a/pwb.py b/pwb.py
index cd99f5f..51e6632 100755
--- a/pwb.py
+++ b/pwb.py
@@ -78,7 +78,7 @@
remove_modules()
os.environ['PYWIKIBOT2_NO_USER_CONFIG'] = '2'
- import pywikibot # flake8: disable=E402
+ import pywikibot # noqa: E402
pwb = pywikibot
@@ -211,7 +211,7 @@
'scripts.maintenance',
'scripts.archive',
'scripts.userscripts']
- from pywikibot import config # flake8: disable=E402
+ from pywikibot import config # noqa: E402
if config.user_script_paths:
if isinstance(config.user_script_paths, (tuple, list)):
script_paths = config.user_script_paths + script_paths
diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index 6404b19..ede1369 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -164,7 +164,7 @@
return self.replace(microsecond=self.microsecond)
@classproperty
- def ISO8601Format(cls): # flake8: disable=N805
+ def ISO8601Format(cls): # noqa: N805
"""ISO8601 format string class property for compatibility
purpose."""
return cls._ISO8601Format()
diff --git a/pywikibot/config2.py b/pywikibot/config2.py
index 35f248d..e42c75c 100644
--- a/pywikibot/config2.py
+++ b/pywikibot/config2.py
@@ -418,7 +418,7 @@
console_encoding = sys.stdout.encoding
else:
console_encoding = sys.stdout.encoding.decode('ascii')
-except:
+except Exception:
# When using pywikibot inside a daemonized twisted application,
# we get "StdioOnnaStick instance has no attribute 'encoding'"
console_encoding = None
@@ -474,7 +474,7 @@
try:
# Don't print colorized when the output is, for example, piped to a file.
colorized_output = sys.stdout.isatty()
-except:
+except Exception:
colorized_output = False
# An indication of the size of your screen, or rather the size of the screen
diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index b0f3865..cdbcfea 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -1998,7 +1998,7 @@
self._params[param] = [str(int(value) // 2)]
pywikibot.output(u"Set %s = %s"
% (param, self._params[param]))
- except:
+ except Exception:
pass
self.wait()
continue
diff --git a/pywikibot/date.py b/pywikibot/date.py
index c1e2a49..a9b0e39 100644
--- a/pywikibot/date.py
+++ b/pywikibot/date.py
@@ -67,7 +67,7 @@
res = func(value)
if pred(res):
return res
- except:
+ except Exception:
pass
else:
# Find a predicate that gives true for this int value, and run a
@@ -2358,7 +2358,7 @@
try:
year = dict[lang](title)
return dictName, year
- except:
+ except Exception:
pass
# sometimes the title may begin with an upper case while its listed as
# lower case, or the other way around
@@ -2370,7 +2370,7 @@
else:
title = first_upper(title)
return getAutoFormat(lang, title, ignoreFirstLetterCase=False)
- except:
+ except Exception:
pass
return None, None
diff --git a/pywikibot/logentries.py b/pywikibot/logentries.py
index b71c2d1..d309b4a 100644
--- a/pywikibot/logentries.py
+++ b/pywikibot/logentries.py
@@ -452,7 +452,7 @@
@classproperty
@deprecated('LogEntryFactory.logtypes')
- def _logtypes(cls): # flake8: disable=N805
+ def _logtypes(cls): # noqa: N805
"""DEPRECATED LogEntryFactory class attribute of log
types."""
return cls.logtypes
diff --git a/pywikibot/logging.py b/pywikibot/logging.py
index e8edec6..4a23a45 100644
--- a/pywikibot/logging.py
+++ b/pywikibot/logging.py
@@ -180,7 +180,7 @@
Use directly after an 'except' statement::
...
- except:
+ except Exception:
pywikibot.exception()
...
diff --git a/pywikibot/page.py b/pywikibot/page.py
index 10144b8..ad87584 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -2704,6 +2704,7 @@
"""
return self.site.globalusage(self, total=total)
+
wrapper = _ModuleDeprecationWrapper(__name__)
wrapper._add_deprecated_attr('ImagePage', FilePage)
diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py
index abd8469..0389c7c 100644
--- a/pywikibot/pagegenerators.py
+++ b/pywikibot/pagegenerators.py
@@ -1008,7 +1008,7 @@
if value:
try:
total = int(value)
- except:
+ except Exception:
params = value.split(';')
if len(params) == 2:
value, total = params
diff --git a/pywikibot/proofreadpage.py b/pywikibot/proofreadpage.py
index a49e657..f4e6a08 100644
--- a/pywikibot/proofreadpage.py
+++ b/pywikibot/proofreadpage.py
@@ -271,7 +271,7 @@
return self._quality
return self.ql
- def decompose(fn): # flake8: disable=N805
+ def decompose(fn): # noqa: N805
"""Decorator.
Decompose text if needed and recompose text.
@@ -704,7 +704,7 @@
self._cached = False
- def check_if_cached(fn): # flake8: disable=N805
+ def check_if_cached(fn): # noqa: N805
"""Decorator to check if data are cached and cache them if
needed."""
def wrapper(self, *args, **kwargs):
if self._cached is False:
diff --git a/pywikibot/site.py b/pywikibot/site.py
index 7b09c7f..9b82484 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -6136,7 +6136,7 @@
3)
if isinstance(ignore_warnings, Iterable):
ignored_warnings = ignore_warnings
- ignore_warnings = lambda warnings: all( # flake8: disable=E731
+ ignore_warnings = lambda warnings: all( # noqa: E731
w.code in ignored_warnings for w in warnings)
ignore_all_warnings = not callable(ignore_warnings) and ignore_warnings
if text is None:
diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index c3e2d6f..472bdbe 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -180,7 +180,7 @@
return func
-class classproperty(object): # flake8: disable=N801
+class classproperty(object): # noqa: N801
"""
Metaclass to accesss a class method as a property.
@@ -207,7 +207,7 @@
return self.method(owner)
-class suppress_warnings(catch_warnings): # flake8: disable=N801
+class suppress_warnings(catch_warnings): # noqa: N801
"""A context manager that temporarily suppresses
warnings."""
diff --git a/pywikibot/tools/djvu.py b/pywikibot/tools/djvu.py
index 3629611..cb842f9 100644
--- a/pywikibot/tools/djvu.py
+++ b/pywikibot/tools/djvu.py
@@ -123,7 +123,7 @@
"""Deprecated file_djvu instance variable."""
return self.file
- def check_cache(fn): # flake8: disable=N805
+ def check_cache(fn): # noqa: N805
"""Decorator to check if cache shall be
cleared."""
cache = ['_page_count', '_has_text', '_page_info']
@@ -136,7 +136,7 @@
return _res
return wrapper
- def check_page_number(fn): # flake8: disable=N805
+ def check_page_number(fn): # noqa: N805
"""Decorator to check if page number is valid.
@raises ValueError
diff --git a/pywikibot/tools/ip.py b/pywikibot/tools/ip.py
index 0b2a99f..50ffe97 100644
--- a/pywikibot/tools/ip.py
+++ b/pywikibot/tools/ip.py
@@ -33,7 +33,7 @@
else:
_ipaddr_version = StrictVersion(_ipaddr_version)
if _ipaddr_version >= StrictVersion('2.1.10'):
- from ipaddr import IPAddress as ip_address # flake8: disable=N813
+ from ipaddr import IPAddress as ip_address # noqa: N813
else:
_ipaddr_e = ImportError('ipaddr %s is broken.' % _ipaddr_version)
diff --git a/pywikibot/userinterfaces/gui.py b/pywikibot/userinterfaces/gui.py
index 1cfe2df..21f866b 100644
--- a/pywikibot/userinterfaces/gui.py
+++ b/pywikibot/userinterfaces/gui.py
@@ -22,7 +22,7 @@
if sys.version_info[0] > 2:
import tkinter as Tkinter
from tkinter.scrolledtext import ScrolledText
- from tkinter import simpledialog as tkSimpleDialog # flake8: disable=N812
+ from tkinter import simpledialog as tkSimpleDialog # noqa: N812
else:
import Tkinter
import tkSimpleDialog
diff --git a/pywikibot/version.py b/pywikibot/version.py
index 6c62ab5..fe3010e 100644
--- a/pywikibot/version.py
+++ b/pywikibot/version.py
@@ -417,7 +417,7 @@
if line.find('__version__') == 0:
try:
exec(line)
- except:
+ except Exception:
pass
break
stat = os.stat(fn)
diff --git a/scripts/casechecker.py b/scripts/casechecker.py
index 9732227..0ed8f82 100755
--- a/scripts/casechecker.py
+++ b/scripts/casechecker.py
@@ -291,13 +291,13 @@
batchStart:batchStart + batchSize]
for data in self.RunQuery(self.queryParams):
self.ProcessDataBlock(data)
- except:
+ except Exception:
pywikibot.output(u'Exception at Title = %s, Next = %s'
% (self.currentTitle, self.apfrom))
try:
import traceback
pywikibot.output(traceback.format_exc())
- except:
+ except Exception:
pywikibot.output(u'Unable to print exception info')
raise
diff --git a/scripts/category.py b/scripts/category.py
index 9edf5f4..6d09ada 100755
--- a/scripts/category.py
+++ b/scripts/category.py
@@ -195,7 +195,7 @@
# like the above, but for supercategories
self.superclassDB = databases['superclassDB']
del databases
- except:
+ except Exception:
# If something goes wrong, just rebuild the database
self.rebuild()
diff --git a/scripts/category_redirect.py b/scripts/category_redirect.py
index 64cbbd1..f17bc2b 100755
--- a/scripts/category_redirect.py
+++ b/scripts/category_redirect.py
@@ -171,7 +171,7 @@
continue
except KeyboardInterrupt:
raise
- except:
+ except Exception:
return (None, None)
def readyToEdit(self, cat):
@@ -342,7 +342,7 @@
# do a null edit on cat
try:
cat.save()
- except:
+ except Exception:
pass
# delete record entries for non-existent categories
@@ -380,7 +380,7 @@
# categories this wiki might maintain
try:
cat.save()
- except:
+ except Exception:
pass
continue
if dest.isCategoryRedirect():
@@ -392,7 +392,7 @@
# do a null edit on cat
try:
cat.save()
- except:
+ except Exception:
pass
else:
self.log_text.append(
@@ -432,7 +432,7 @@
# do a null edit on cat
try:
cat.save()
- except:
+ except Exception:
pass
with open(datafile, "wb") as f:
diff --git a/scripts/flickrripper.py b/scripts/flickrripper.py
index 6712a40..b03604d 100755
--- a/scripts/flickrripper.py
+++ b/scripts/flickrripper.py
@@ -352,7 +352,7 @@
user_id=user_id, tags=tags,
per_page='100', page='1')
pages = photos.find('photos').attrib['pages']
- gen = lambda i: flickr.groups_pools_getPhotos( # flake8: disable=E731
+ gen = lambda i: flickr.groups_pools_getPhotos( # noqa: E731
group_id=group_id, user_id=user_id, tags=tags,
per_page='100', page=i
).find('photos').getchildren()
@@ -362,7 +362,7 @@
photos = flickr.photosets_getPhotos(photoset_id=photoset_id,
per_page='100', page='1')
pages = photos.find('photoset').attrib['pages']
- gen = lambda i: flickr.photosets_getPhotos( # flake8: disable=E731
+ gen = lambda i: flickr.photosets_getPhotos( # noqa: E731
photoset_id=photoset_id, per_page='100', page=i
).find('photoset').getchildren()
#
https://www.flickr.com/services/api/flickr.people.getPublicPhotos.html
@@ -371,7 +371,7 @@
photos = flickr.people_getPublicPhotos(user_id=user_id,
per_page='100', page='1')
pages = photos.find('photos').attrib['pages']
- gen = lambda i: flickr.people_getPublicPhotos( # flake8: disable=E731
+ gen = lambda i: flickr.people_getPublicPhotos( # noqa: E731
user_id=user_id, per_page='100', page=i
).find('photos').getchildren()
for i in range(1, int(pages) + 1):
diff --git a/scripts/followlive.py b/scripts/followlive.py
index 50a7af0..9b0098e 100644
--- a/scripts/followlive.py
+++ b/scripts/followlive.py
@@ -542,5 +542,6 @@
bot = CleaningBot(questions, questionlist)
bot.run()
+
if __name__ == '__main__':
main()
diff --git a/scripts/interwiki.py b/scripts/interwiki.py
index 2648618..5b90a34 100755
--- a/scripts/interwiki.py
+++ b/scripts/interwiki.py
@@ -1459,8 +1459,7 @@
f.write("\n")
f.close()
# FIXME: What errors are we catching here?
- # except: should be avoided!!
- except:
+ except Exception:
# raise
pywikibot.output(
'File autonomous_problems.dat open or corrupted! '
@@ -2360,10 +2359,10 @@
if not summary and \
len(adding) + len(removing) + len(modifying) <= 3:
# Use an extended format for the string linking to all added pages.
- fmt = lambda d, site: unicode(d[site]) # flake8: disable=E731
+ fmt = lambda d, site: unicode(d[site]) # noqa: E731
else:
# Use short format, just the language code
- fmt = lambda d, site: site.code # flake8: disable=E731
+ fmt = lambda d, site: site.code # noqa: E731
mods = mcomment = u''
@@ -2631,7 +2630,7 @@
bot.run()
except KeyboardInterrupt:
dumpFileName = bot.dump(append)
- except:
+ except Exception:
dumpFileName = bot.dump(append)
raise
finally:
diff --git a/scripts/maintenance/cache.py b/scripts/maintenance/cache.py
index ac66b35..efde576 100755
--- a/scripts/maintenance/cache.py
+++ b/scripts/maintenance/cache.py
@@ -304,7 +304,7 @@
else:
try:
return eval('lambda entry: ' + command)
- except:
+ except Exception:
pywikibot.exception()
pywikibot.error(
'Cannot compile {0} command: {1}'.format(name, command))
diff --git a/scripts/maintenance/make_i18n_dict.py
b/scripts/maintenance/make_i18n_dict.py
index edb32a5..1ceb233 100755
--- a/scripts/maintenance/make_i18n_dict.py
+++ b/scripts/maintenance/make_i18n_dict.py
@@ -45,7 +45,7 @@
from pywikibot import config
-class i18nBot(object): # flake8: disable=N801
+class i18nBot(object): # noqa: N801
"""I18n bot."""
diff --git a/scripts/makecat.py b/scripts/makecat.py
index 5946c18..c4c6f1b 100755
--- a/scripts/makecat.py
+++ b/scripts/makecat.py
@@ -285,5 +285,5 @@
finally:
try:
excludefile.close()
- except:
+ except Exception:
pass
diff --git a/scripts/noreferences.py b/scripts/noreferences.py
index 7f0a213..932e10c 100755
--- a/scripts/noreferences.py
+++ b/scripts/noreferences.py
@@ -735,7 +735,7 @@
try:
cat = site.expand_text(
site.mediawiki_message(maintenance_category))
- except:
+ except Exception:
pass
else:
cat = pywikibot.Category(site, "%s:%s" % (
diff --git a/scripts/patrol.py b/scripts/patrol.py
index 98de168..a20484e 100755
--- a/scripts/patrol.py
+++ b/scripts/patrol.py
@@ -279,7 +279,7 @@
author_ns = 0
try:
author_ns = self.site.family.authornamespaces[self.site.lang][0]
- except:
+ except Exception:
pass
if author_ns:
author_ns_prefix = self.site.namespace(author_ns)
diff --git a/scripts/script_wui.py b/scripts/script_wui.py
index 839bf24..9fadbeb 100755
--- a/scripts/script_wui.py
+++ b/scripts/script_wui.py
@@ -93,7 +93,7 @@
if sys.version_info[0] > 2:
import _thread as thread
else:
- import thread # flake8: disable=H237 (module does not exist in Python 3)
+ import thread # noqa: H237 (module does not exist in Python 3)
try:
import resource
@@ -220,7 +220,7 @@
try:
thread.start_new_thread(main_script, (self.refs[page_title], rev,
params))
- except:
+ except Exception:
# (done according to subster in trunk and submit in
# rewrite/.../data/api.py)
# TODO: is this error handling here needed at all??!?
@@ -263,7 +263,7 @@
code = page.getOldVersion(rev) # crontab; scheduled
try:
exec(code)
- except:
+ except Exception:
# (done according to subster in trunk and submit in
# rewrite/.../data/api.py)
@@ -355,7 +355,7 @@
bot = ScriptWUIBot(site, chan, site.user() + "_WUI",
"irc.wikimedia.org")
try:
bot.start()
- except:
+ except Exception:
bot.t.cancel()
raise
diff --git a/scripts/weblinkchecker.py b/scripts/weblinkchecker.py
index c17a41e..54ac583 100755
--- a/scripts/weblinkchecker.py
+++ b/scripts/weblinkchecker.py
@@ -360,7 +360,7 @@
conn.request('HEAD', '/', None, self.header)
self.response = conn.getresponse()
self.readEncodingFromResponse(self.response)
- except:
+ except Exception:
pass
if not self.serverEncoding:
# TODO: We might also load a page, then check for an encoding
@@ -379,7 +379,7 @@
charsetR = re.compile('charset=(.+)')
charset = charsetR.search(ct).group(1)
self.serverEncoding = charset
- except:
+ except Exception:
pass
def changeUrl(self, url):
@@ -605,7 +605,7 @@
message = i18n.twtranslate(self.page.site,
'weblinkchecker-badurl_msg',
{'URL': self.url})
- except:
+ except Exception:
pywikibot.output('Exception while processing URL %s in page %s'
% (self.url, self.page.title()))
raise
diff --git a/tests/replacebot_tests.py b/tests/replacebot_tests.py
index 938574d..eb67f37 100644
--- a/tests/replacebot_tests.py
+++ b/tests/replacebot_tests.py
@@ -43,14 +43,14 @@
changed_pages = -42 # show that weird number to show this was used
- def __init__(inner_self, *args, **kwargs): # flake8: disable=N805
+ def __init__(inner_self, *args, **kwargs): # noqa: N805
# Unpatch already here, as otherwise super calls will use
# this class' super which is the class itself
replace.ReplaceRobot = self._original_bot
super(FakeReplaceBot, inner_self).__init__(*args, **kwargs)
self.bots.append(inner_self)
- def run(inner_self): # flake8: disable=N805
+ def run(inner_self): # noqa: N805
"""Nothing to do here."""
inner_self.changed_pages = -47 # show that run was called
diff --git a/tests/tools_tests.py b/tests/tools_tests.py
index 791ab57..9039a54 100644
--- a/tests/tools_tests.py
+++ b/tests/tools_tests.py
@@ -828,7 +828,7 @@
_bar = 'baz'
@classproperty
- def bar(cls): # flake8: disable=N805
+ def bar(cls): # noqa: N805
"""Class property method."""
return cls._bar
diff --git a/tox.ini b/tox.ini
index e7ad918..a378065 100644
--- a/tox.ini
+++ b/tox.ini
@@ -54,12 +54,12 @@
flake8 --version
flake8 --doctests {posargs}
basepython = python2.7
-deps = flake8<3
+deps = flake8
pyflakes >= 1.1
pydocstyle == 2.0.0
hacking
flake8-docstrings>=1.1.0
- flake8-putty>=0.3.2
+ flake8-per-file-ignores
flake8-coding<1.3.0
flake8-comprehensions
flake8-future-import
@@ -78,7 +78,7 @@
deps = flake8-diff
https://github.com/erikrose/blessings/archive/4a226d07.zip
flake8-docstrings<0.2.2
- flake8-putty
+ flake8-per-file-ignores
pep8-naming
flake8-quotes
flake8-blind-except
@@ -160,44 +160,51 @@
# D413: Missing blank line after last section
# D412: No blank lines allowed between a section header and its content
-ignore =
C401,C402,C405,E402,D105,D211,FI10,FI12,FI13,FI15,FI16,FI17,FI5,H101,H201,H236,H301,H404,H405,I100,I101,I202,N802,N803,N806,D401,D413,D103,D412
+ignore =
C401,C402,C405,E402,D105,D211,FI10,FI12,FI13,FI15,FI16,FI17,FI5,H101,H201,H236,H301,H404,H405,H903,I100,I101,I202,N802,N803,N806,D401,D413,D103,D412
exclude = .tox,.git,./*.egg,ez_setup.py,build,externals,user-config.py,./scripts/i18n/*
min-version = 2.6
max_line_length = 100
accept-encodings = utf-8
require-code = true
-putty-auto-ignore = true
-putty-ignore =
- generate_family_file.py : +T001
- pwb.py : +T001
- setup.py : +T001
- pywikibot/comms/http.py : +T001
-
pywikibot/date.py,pywikibot/family.py,pywikibot/fixes.py,pywikibot/textlib.py,pywikibot/userinterfaces/terminal_interface_unix.py,pywikibot/userinterfaces/terminal_interface_win32.py,pywikibot/families/wikipedia_family.py
: +E241
- pywikibot/textlib.py : +N801
- pywikibot/userinterfaces/transliteration.py : +N801
- pywikibot/userinterfaces/win32_unicode.py : +N801, N812, T001
- tests/page_tests.py : +E241
- scripts/,/pagegenerators.parameterHelp/ : +E241
- scripts/imagetransfer.py,scripts/maintenance/wikimedia_sites.py : +E241
- tests/ui_tests.py : +D102, D103, N801
- tests/__init__.py,tests/aspects.py,tests/script_tests.py,tests/pwb/ : +T001
- tests/,/from pywikibot.tools import/ : +N813
- scripts/checkimages.py,scripts/imagecopy.py,scripts/imagecopy_self.py : +N801
- scripts/maintenance/make_i18n_dict.py : +T001
- scripts/archive/featured.py : +D102, D103
- scripts/flickrripper.py : +T001
- scripts/harvest_template.py : +T001
- scripts/script_wui.py : +D102
- scripts/makecat.py : +D103
- scripts/interwiki.py,/""/ : +P102
- pywikibot/__init__.py,/link_regex/ : +P103
+per-file-ignores =
+ generate_family_file.py : T001
+ pwb.py : T001
+ setup.py : T001
+ pywikibot/comms/http.py : T001
+ pywikibot/date.py : E241
+ pywikibot/family.py : E241
+ pywikibot/fixes.py : E241
+ pywikibot/textlib.py : E241
+ pywikibot/userinterfaces/terminal_interface_unix.py : E241
+ pywikibot/userinterfaces/terminal_interface_win32.py : E241
+ pywikibot/textlib.py : N801
+ pywikibot/userinterfaces/transliteration.py : N801
+ pywikibot/userinterfaces/win32_unicode.py : N801, N812, T001
+ tests/page_tests.py : E241
+ scripts/imagetransfer.py : E241
+ tests/ui_tests.py : D102, D103, N801
+ tests/* : N813
+ scripts/checkimages.py : N801
+ scripts/imagecopy.py : N801
+ scripts/imagecopy_self.py : N801
+ scripts/archive/featured.py : D102, D103
+ scripts/flickrripper.py : T001
+ scripts/harvest_template.py : T001
+ scripts/script_wui.py : D102
+ scripts/makecat.py : D103
+ scripts/interwiki.py : P102
+ pywikibot/__init__.py : P103
# valid N805 naming convention exceptions
- pywikibot/userinterfaces/terminal_interface.py,/from
pywikibot.userinterfaces.terminal_interface_.* import .* as UI/ : +N814
+ pywikibot/userinterfaces/terminal_interface.py : N814
# invalidly detected as {} format string:
- tests/textlib_tests.py,/self.assert.*{{/ : +P103
+ tests/textlib_tests.py : P103
# __dict__ used in a discouraged manner
# regex matches the first physical line of logical line of the error
- pywikibot/exceptions.py , /PageRelatedError.*__init__/ : +H501
+ pywikibot/exceptions.py : H501
+ # Todo: E741: ambiguous variable name
+ tests/link_tests.py : E741
+ tests/page_tests.py : E741
+ scripts/category_redirect.py : E741
[pep8]
# see explanations above
--
To view, visit
https://gerrit.wikimedia.org/r/395483
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6116089cb0b332f8dbd0cc454b0b02d7f919af2a
Gerrit-PatchSet: 6
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Siebrand <siebrand(a)kitano.nl>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: Zoranzoki21 <zorandori4444(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>