python3 support: pylint,W1610 # (reduce-builtin) reduce built-in referenced
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Fri, 12 Oct 2018 12:06:45 +0300
changeset 2456 7373e3048167
parent 2455 80b225e9a6b6
child 2457 9deec258ab1a
python3 support: pylint,W1610 # (reduce-builtin) reduce built-in referenced
PLCControler.py
PLCGenerator.py
ProjectController.py
controls/CustomStyledTextCtrl.py
controls/DebugVariablePanel/DebugVariablePanel.py
controls/DebugVariablePanel/DebugVariableViewer.py
controls/LibraryPanel.py
controls/SearchResultPanel.py
editors/TextViewer.py
etherlab/EthercatMaster.py
plcopen/structures.py
targets/toolchain_gcc.py
targets/toolchain_makefile.py
tests/tools/check_source.sh
util/misc.py
xmlclass/xmlclass.py
--- a/PLCControler.py	Fri Oct 12 11:50:40 2018 +0300
+++ b/PLCControler.py	Fri Oct 12 12:06:45 2018 +0300
@@ -31,6 +31,7 @@
 import re
 import datetime
 from time import localtime
+from functools import reduce
 
 import util.paths as paths
 from plcopen import *
--- a/PLCGenerator.py	Fri Oct 12 11:50:40 2018 +0300
+++ b/PLCGenerator.py	Fri Oct 12 12:06:45 2018 +0300
@@ -25,6 +25,7 @@
 
 from __future__ import absolute_import
 import re
+from functools import reduce
 from six.moves import xrange
 
 from plcopen import PLCOpenParser
--- a/ProjectController.py	Fri Oct 12 11:50:40 2018 +0300
+++ b/ProjectController.py	Fri Oct 12 12:06:45 2018 +0300
@@ -39,6 +39,7 @@
 from threading import Timer
 from datetime import datetime
 from weakref import WeakKeyDictionary
+from functools import reduce
 from six.moves import xrange
 
 import wx
--- a/controls/CustomStyledTextCtrl.py	Fri Oct 12 11:50:40 2018 +0300
+++ b/controls/CustomStyledTextCtrl.py	Fri Oct 12 12:06:45 2018 +0300
@@ -24,6 +24,7 @@
 
 
 from __future__ import absolute_import
+from functools import reduce
 import wx
 import wx.stc
 from six.moves import xrange
--- a/controls/DebugVariablePanel/DebugVariablePanel.py	Fri Oct 12 11:50:40 2018 +0300
+++ b/controls/DebugVariablePanel/DebugVariablePanel.py	Fri Oct 12 12:06:45 2018 +0300
@@ -25,6 +25,7 @@
 
 from __future__ import absolute_import
 from __future__ import division
+from functools import reduce
 import numpy
 
 import wx
--- a/controls/DebugVariablePanel/DebugVariableViewer.py	Fri Oct 12 11:50:40 2018 +0300
+++ b/controls/DebugVariablePanel/DebugVariableViewer.py	Fri Oct 12 12:06:45 2018 +0300
@@ -26,6 +26,7 @@
 from __future__ import absolute_import
 from __future__ import division
 from collections import OrderedDict
+from functools import reduce
 
 import wx
 from matplotlib.backends.backend_wxagg import _convert_agg_to_wx_bitmap
--- a/controls/LibraryPanel.py	Fri Oct 12 11:50:40 2018 +0300
+++ b/controls/LibraryPanel.py	Fri Oct 12 12:06:45 2018 +0300
@@ -23,6 +23,7 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 from __future__ import absolute_import
+from functools import reduce
 import wx
 
 # -------------------------------------------------------------------------------
--- a/controls/SearchResultPanel.py	Fri Oct 12 11:50:40 2018 +0300
+++ b/controls/SearchResultPanel.py	Fri Oct 12 12:06:45 2018 +0300
@@ -24,6 +24,7 @@
 
 
 from __future__ import absolute_import
+from functools import reduce
 
 import wx
 import wx.lib.buttons
--- a/editors/TextViewer.py	Fri Oct 12 11:50:40 2018 +0300
+++ b/editors/TextViewer.py	Fri Oct 12 12:06:45 2018 +0300
@@ -26,6 +26,7 @@
 from __future__ import absolute_import
 from __future__ import division
 import re
+from functools import reduce
 
 import wx
 import wx.stc
--- a/etherlab/EthercatMaster.py	Fri Oct 12 11:50:40 2018 +0300
+++ b/etherlab/EthercatMaster.py	Fri Oct 12 12:06:45 2018 +0300
@@ -12,6 +12,7 @@
 from __future__ import absolute_import
 import os
 from copy import deepcopy
+from functools import reduce
 from lxml import etree
 
 import wx
--- a/plcopen/structures.py	Fri Oct 12 11:50:40 2018 +0300
+++ b/plcopen/structures.py	Fri Oct 12 12:06:45 2018 +0300
@@ -26,6 +26,7 @@
 from __future__ import absolute_import
 import re
 from collections import OrderedDict
+from functools import reduce
 
 from plcopen.plcopen import LoadProject
 from plcopen.definitions import *
--- a/targets/toolchain_gcc.py	Fri Oct 12 11:50:40 2018 +0300
+++ b/targets/toolchain_gcc.py	Fri Oct 12 12:06:45 2018 +0300
@@ -29,7 +29,7 @@
 import re
 import operator
 import hashlib
-
+from functools import reduce
 from util.ProcessLogger import ProcessLogger
 
 
--- a/targets/toolchain_makefile.py	Fri Oct 12 11:50:40 2018 +0300
+++ b/targets/toolchain_makefile.py	Fri Oct 12 12:06:45 2018 +0300
@@ -28,7 +28,7 @@
 import re
 import operator
 import hashlib
-
+from functools import reduce
 from util.ProcessLogger import ProcessLogger
 
 
--- a/tests/tools/check_source.sh	Fri Oct 12 11:50:40 2018 +0300
+++ b/tests/tools/check_source.sh	Fri Oct 12 12:06:45 2018 +0300
@@ -374,6 +374,7 @@
     enable=$enable,W1625          # (raising-string) Raising a string exception
     enable=$enable,W1622          # (next-method-called) Called a next() method on an object
     enable=$enable,W1653          # (next-method-defined) next method defined
+    enable=$enable,W1610          # (reduce-builtin) reduce built-in referenced
     # enable=
 
     options=
--- a/util/misc.py	Fri Oct 12 11:50:40 2018 +0300
+++ b/util/misc.py	Fri Oct 12 12:06:45 2018 +0300
@@ -29,6 +29,7 @@
 
 from __future__ import absolute_import
 import os
+from functools import reduce
 
 from util.BitmapLibrary import AddBitmapFolder
 from util.TranslationCatalogs import AddCatalog
--- a/xmlclass/xmlclass.py	Fri Oct 12 11:50:40 2018 +0300
+++ b/xmlclass/xmlclass.py	Fri Oct 12 12:06:45 2018 +0300
@@ -32,6 +32,7 @@
 from xml.sax.saxutils import unescape
 from collections import OrderedDict
 from builtins import str as text
+from functools import reduce
 
 from six import string_types
 from six.moves import xrange