jenkins-bot has submitted this change and it was merged.
Change subject: Pass pep8 1.5.x ......................................................................
Pass pep8 1.5.x
Ignored some annoying errors:
E112 expected an indented block Because lot of code is commented out at the very beginning of line
E265 block comment should start with '# ' Rather annoying, but not much of a trouble. There is code commented out with ##
Change-Id: Ic923f50508a32f029d1e682511cd46357331dfc4 --- M checkimages.py M interwiki.py M parserfunctioncount.py M standardize_notes.py M tox.ini M wikipedia.py 6 files changed, 22 insertions(+), 15 deletions(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/checkimages.py b/checkimages.py index 8f161b1..333f97f 100644 --- a/checkimages.py +++ b/checkimages.py @@ -1441,8 +1441,8 @@
if self.allLicenses: self.license_found = self.allLicenses[0].title() - self.some_problem = False # If it has "some_problem" it must check - # the additional settings. + # If it has "some_problem" it must check the additional settings. + self.some_problem = False
if self.settingsData: # use additional settings diff --git a/interwiki.py b/interwiki.py index 100044f..2011015 100644 --- a/interwiki.py +++ b/interwiki.py @@ -1442,7 +1442,7 @@ # FIXME: What errors are we catching here? # except: should be avoided!! except: - #raise + #raise pywikibot.output(u'File autonomous_problems.dat open or ' u'corrupted! Try again with -restore.') sys.exit() diff --git a/parserfunctioncount.py b/parserfunctioncount.py index 2c5c863..9d0e306 100644 --- a/parserfunctioncount.py +++ b/parserfunctioncount.py @@ -59,10 +59,11 @@
def main(*args): + # default is left out because it may occur within switch only. words = ['expr', 'if', 'ifeq', 'ifexpr', 'iferror', 'switch', 'ifexist', 'time', 'timel', 'rel2abs', 'titleparts', 'len', 'pos', 'rpos', 'sub', 'count', 'replace', 'explode', 'urldecode'] - # default is left out because it may occur within switch only. + addwords = { # Write translated parser function names here. 'hu': [u'kif', u'ha', u'haegyenlő', u'hakif', u'hahibás', u'halétezik', diff --git a/standardize_notes.py b/standardize_notes.py index d0b3d47..714716b 100644 --- a/standardize_notes.py +++ b/standardize_notes.py @@ -625,10 +625,11 @@ text_line = ( text_line[:m.start(0)] + '{{ref_label|%s|%d|%s}}' - % (refkey, (refusage[refkey][0]) + 1, - string.ascii_lowercase[ - ((refusage[refkey][2]) - 1) % 26 - ]) + text_line[m.end(0):]) + % ( + refkey, + (refusage[refkey][0]) + 1, + string.ascii_lowercase[((refusage[refkey][2]) - 1) % 26] + ) + text_line[m.end(0):]) # count use of reference refusage[refkey][2] += 1 else: diff --git a/tox.ini b/tox.ini index 33bd621..1a0236b 100644 --- a/tox.ini +++ b/tox.ini @@ -4,9 +4,11 @@
[testenv:lint] commands = pep8 -deps = pep8==1.4.6 +deps = pep8<1.6
[pep8] -ignore = E122,E127,E241,E226,E502,W602 +# E112 expected an indented block +# E265 block comment should start with '# ' +ignore = E112,E122,E127,E241,E226,E265,E502,W602 exclude = ./catimages.py,./wiktionary.py,./wiktionary/*,./tests/*,./userinterfaces/*,./commonsdelinker/*,./families/*,./maintenance/*,./pywikibot/*,./externals/*,./.tox max_line_length = 256 diff --git a/wikipedia.py b/wikipedia.py index 35438b5..9cd3d09 100644 --- a/wikipedia.py +++ b/wikipedia.py @@ -9983,13 +9983,15 @@ global logger # _handlers_initialized
if not logger: + # for messages to be displayed on terminal at "verbose" setting + # use INFO for messages to be displayed even on non-verbose setting logging.addLevelName(VERBOSE, "VERBOSE") - # for messages to be displayed on terminal at "verbose" setting - # use INFO for messages to be displayed even on non-verbose setting + + # for messages to be displayed to stdout logging.addLevelName(STDOUT, "STDOUT") - # for messages to be displayed to stdout + + # for prompts requiring user response logging.addLevelName(INPUT, "INPUT") - # for prompts requiring user response
logger = logging.getLogger() # root logger
@@ -10418,8 +10420,9 @@
""" def remaining(): + # -1 because we added a None element to stop the queue remainingPages = page_put_queue.qsize() - 1 - # -1 because we added a None element to stop the queue + remainingSeconds = datetime.timedelta( seconds=(remainingPages * put_throttle.getDelay(True))) return (remainingPages, remainingSeconds)
pywikibot-commits@lists.wikimedia.org