jenkins-bot has submitted this change and it was merged.
Change subject: Pass pep8 1.6.x ......................................................................
Pass pep8 1.6.x
Ignored some annoying errors:
E115 expected an indented block (comment) E266 too many leading '#' for block comment Due to blocks of code being commented out.
E402 module level import not at top of file Too spammy to fix them all.
E731 do not assign a lambda expression, use a def lambdas are uses quite a lot, potentially can be refactored one day, but don't bother for now.
W503 line break before binary operator In the cases I looked at, that does not seem to compromise the readability or understand of the code flow.
Ignore with noqa: ./mysql_autoconnection.py:98:30: E721 do not compare types, use 'isinstance()'
if type(cursorclass) is not type(self.__cursor):
Change-Id: I687d6d7cfc5f47aafd43f134ee65c4bb8d1c9353 --- M mysql_autoconnection.py M tox.ini 2 files changed, 8 insertions(+), 3 deletions(-)
Approvals: John Vandenberg: Looks good to me, approved Hashar: Looks good to me, but someone else must approve jenkins-bot: Verified
diff --git a/mysql_autoconnection.py b/mysql_autoconnection.py index 7116dd9..5495551 100644 --- a/mysql_autoconnection.py +++ b/mysql_autoconnection.py @@ -95,7 +95,7 @@ pass
def cursor(self, cursorclass=MySQLdb.cursors.Cursor): - if type(cursorclass) is not type(self.__cursor): + if type(cursorclass) is not type(self.__cursor): # noqa self.__cursor = self.database.cursor(cursorclass) return self
diff --git a/tox.ini b/tox.ini index 1a0236b..cf8308c 100644 --- a/tox.ini +++ b/tox.ini @@ -4,11 +4,16 @@
[testenv:lint] commands = pep8 -deps = pep8<1.6 +deps = pep8<1.7
[pep8] # E112 expected an indented block +# E115 expected an indented block (comment) # E265 block comment should start with '# ' -ignore = E112,E122,E127,E241,E226,E265,E502,W602 +# E266 too many leading '#' for block comment +# E402 module level import not at top of file +# E731 do not assign a lambda expression, use a def +# W503 line break before binary operator +ignore = E112,E115,E122,E127,E241,E226,E265,E266,E402,E502,E731,W503,W602 exclude = ./catimages.py,./wiktionary.py,./wiktionary/*,./tests/*,./userinterfaces/*,./commonsdelinker/*,./families/*,./maintenance/*,./pywikibot/*,./externals/*,./.tox max_line_length = 256
pywikibot-commits@lists.wikimedia.org