jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390381 )
Change subject: [test] Fix print function doc tests ......................................................................
[test] Fix print function doc tests
behaviour of flake8-print has been changed since 3.01. Change the tests exception list then.
Change-Id: Iad9b5790b299dfb17daa8cec0ef11c6c8b1231cb --- M pywikibot/comms/http.py M pywikibot/userinterfaces/win32_unicode.py M scripts/flickrripper.py M scripts/harvest_template.py M tox.ini 5 files changed, 14 insertions(+), 11 deletions(-)
Approvals: Dalba: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py index 146f8b6..b6fb20d 100644 --- a/pywikibot/comms/http.py +++ b/pywikibot/comms/http.py @@ -117,7 +117,7 @@ message = 'Closing network session.' if hasattr(sys, 'last_type'): # we quit because of an exception - print(sys.last_type) # flake8: disable=T003 (print) + print(sys.last_type) critical(message) else: log(message) diff --git a/pywikibot/userinterfaces/win32_unicode.py b/pywikibot/userinterfaces/win32_unicode.py index f769a91..19ed9bb 100755 --- a/pywikibot/userinterfaces/win32_unicode.py +++ b/pywikibot/userinterfaces/win32_unicode.py @@ -175,7 +175,7 @@ # so that we can at least see them. def _complain(message): print(isinstance(message, str) and message or repr(message), - file=original_stderr) # noqa: print + file=original_stderr)
def register_cp65001(): diff --git a/scripts/flickrripper.py b/scripts/flickrripper.py index 8afd672..6712a40 100755 --- a/scripts/flickrripper.py +++ b/scripts/flickrripper.py @@ -47,8 +47,8 @@ import flickrapi # see: http://stuvel.eu/projects/flickrapi except ImportError as e: print('This script requires the python flickrapi module. \n' - 'See: http://stuvel.eu/projects/flickrapi') # noqa: print - print(e) # flake8: disable=T003 (print) + 'See: http://stuvel.eu/projects/flickrapi') + print(e) sys.exit(1)
import pywikibot diff --git a/scripts/harvest_template.py b/scripts/harvest_template.py index 2d797b9..0869356 100755 --- a/scripts/harvest_template.py +++ b/scripts/harvest_template.py @@ -94,7 +94,7 @@ if not willstop: willstop = True print('Received ctrl-c. Finishing current item; ' - 'press ctrl-c again to abort.') # noqa + 'press ctrl-c again to abort.') else: raise KeyboardInterrupt
diff --git a/tox.ini b/tox.ini index 504dc70..e7ad918 100644 --- a/tox.ini +++ b/tox.ini @@ -168,22 +168,25 @@ require-code = true putty-auto-ignore = true putty-ignore = - generate_family_file.py : +T001, T003 - pwb.py : +T001, T003 - setup.py : +T003 + 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 + 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, T003 + 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, T003 + 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-commits@lists.wikimedia.org