Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344821 )

Change subject: [tox] Remove print_function import for several scripts
......................................................................

[tox] Remove print_function import for several scripts

- There are few scripts where print_function is imported from __future__
  but print statement/function is not used. The import can be removed.
- print statement/function is prohibit by flake T003, exceptions are
  defined in tox.ini. site_detect_tests.py does not use print function
  anymore and can be removed from this list.
- maintenance/make_i18n_dict.py uses print function but print_function is
  not imported there. The script may fail for older python versions.
  print_funtion is imported now.

Change-Id: I949c4768c8a032785bb7aec2c173c75e53288a75
---
M pywikibot/data/mysql.py
M pywikibot/tools/__init__.py
M scripts/casechecker.py
M scripts/maintenance/cache.py
M scripts/maintenance/make_i18n_dict.py
M tests/utils.py
M tox.ini
7 files changed, 13 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/21/344821/1

diff --git a/pywikibot/data/mysql.py b/pywikibot/data/mysql.py
index 0f9a969..a0b03f9 100644
--- a/pywikibot/data/mysql.py
+++ b/pywikibot/data/mysql.py
@@ -1,11 +1,11 @@
 # -*- coding: utf-8 -*-
 """Miscellaneous helper functions for mysql queries."""
 #
-# (C) Pywikibot team, 2016
+# (C) Pywikibot team, 2016-2017
 #
 # Distributed under the terms of the MIT license.
 #
-from __future__ import absolute_import, print_function, unicode_literals
+from __future__ import absolute_import, unicode_literals
 __version__ = '$Id$'
 
 # Requires oursql <https://pythonhosted.org/oursql/> or
diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index 261f5ac..c89bd6a 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -1,11 +1,11 @@
 # -*- coding: utf-8 -*-
 """Miscellaneous helper functions (not wiki-dependent)."""
 #
-# (C) Pywikibot team, 2008-2016
+# (C) Pywikibot team, 2008-2017
 #
 # Distributed under the terms of the MIT license.
 #
-from __future__ import absolute_import, print_function, unicode_literals
+from __future__ import absolute_import, unicode_literals
 __version__ = '$Id$'
 
 import collections
diff --git a/scripts/casechecker.py b/scripts/casechecker.py
index 9faa1cb..61287ab 100755
--- a/scripts/casechecker.py
+++ b/scripts/casechecker.py
@@ -6,7 +6,7 @@
 #
 # Distributed under the terms of the MIT license.
 #
-from __future__ import absolute_import, print_function, unicode_literals
+from __future__ import absolute_import, unicode_literals
 __version__ = '$Id$'
 
 import codecs
diff --git a/scripts/maintenance/cache.py b/scripts/maintenance/cache.py
index 58fb6f8..ff75e02 100755
--- a/scripts/maintenance/cache.py
+++ b/scripts/maintenance/cache.py
@@ -59,11 +59,11 @@
     uniquedesc(entry)
 """
 #
-# (C) Pywikibot team, 2014-2015
+# (C) Pywikibot team, 2014-2017
 #
 # Distributed under the terms of the MIT license.
 #
-from __future__ import absolute_import, print_function, unicode_literals
+from __future__ import absolute_import, unicode_literals
 __version__ = '$Id$'
 #
 
diff --git a/scripts/maintenance/make_i18n_dict.py 
b/scripts/maintenance/make_i18n_dict.py
index ce7a6a4..357401e 100755
--- a/scripts/maintenance/make_i18n_dict.py
+++ b/scripts/maintenance/make_i18n_dict.py
@@ -31,12 +31,12 @@
 >>> bot.to_json()
 """
 #
-# (C) xqt, 2013-2016
-# (C) Pywikibot team, 2013-2016
+# (C) xqt, 2013-2017
+# (C) Pywikibot team, 2013-2017
 #
 # Distributed under the terms of the MIT license.
 #
-from __future__ import absolute_import, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 __version__ = '$Id$'
 #
diff --git a/tests/utils.py b/tests/utils.py
index 7ff1594..024f1d5 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -1,11 +1,11 @@
 # -*- coding: utf-8 -*-
 """Test utilities."""
 #
-# (C) Pywikibot team, 2013-2016
+# (C) Pywikibot team, 2013-2017
 #
 # Distributed under the terms of the MIT license.
 #
-from __future__ import absolute_import, print_function, unicode_literals
+from __future__ import absolute_import, unicode_literals
 __version__ = '$Id$'
 #
 import inspect
diff --git a/tox.ini b/tox.ini
index aa26b80..7e0a0af 100644
--- a/tox.ini
+++ b/tox.ini
@@ -155,8 +155,7 @@
     scripts/,/pagegenerators.parameterHelp/ : +E241
     
scripts/imagetransfer.py,scripts/interwiki.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/site_detect_tests.py
 : +T001, T003
-    tests/pwb/ : +T001, T003
+    tests/__init__.py,tests/aspects.py,tests/script_tests.py,tests/pwb/ : 
+T001, T003
     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

-- 
To view, visit https://gerrit.wikimedia.org/r/344821
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I949c4768c8a032785bb7aec2c173c75e53288a75
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to