fix pylint error '(too-many-function-args) Too many positional arguments for function call'
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Thu, 12 Oct 2017 16:18:05 +0300
changeset 1870 4d070115b552
parent 1869 49cdd843c006
child 1871 933fbe9a5e2c
fix pylint error '(too-many-function-args) Too many positional arguments for function call'
controls/SearchResultPanel.py
graphics/GraphicCommons.py
runtime/NevowServer.py
svgui/pyjs/lib/pyjslib.py
tests/tools/check_source.sh
--- a/controls/SearchResultPanel.py	Wed Oct 11 13:55:56 2017 +0300
+++ b/controls/SearchResultPanel.py	Thu Oct 12 16:18:05 2017 +0300
@@ -315,10 +315,7 @@
             text_ctrl.SetStyle(start_idx, end_idx, style)
             self.SearchResultsTree.SetItemWindow(root, text_ctrl)
 
-        if wx.VERSION >= (2, 6, 0):
-            item, root_cookie = self.SearchResultsTree.GetFirstChild(root)
-        else:
-            item, root_cookie = self.SearchResultsTree.GetFirstChild(root, 0)
+        item, root_cookie = self.SearchResultsTree.GetFirstChild(root)
         for child in infos["children"]:
             if item is None:
                 item = self.SearchResultsTree.AppendItem(root, "")
--- a/graphics/GraphicCommons.py	Wed Oct 11 13:55:56 2017 +0300
+++ b/graphics/GraphicCommons.py	Thu Oct 12 16:18:05 2017 +0300
@@ -363,7 +363,7 @@
         pass
 
     # Refresh the position of wires connected to element inputs and outputs
-    def RefreshConnected(self):
+    def RefreshConnected(self, exclude=None):
         pass
 
     # Change the parent
--- a/runtime/NevowServer.py	Wed Oct 11 13:55:56 2017 +0300
+++ b/runtime/NevowServer.py	Thu Oct 12 16:18:05 2017 +0300
@@ -157,7 +157,7 @@
         """
         Force content type to fit with SVG
         """
-        req = inevow.IRequest(ctx)
+        req = ctx.locate(inevow.IRequest)
         req.setHeader('Content-type', 'application/xhtml+xml')
         return super(WebInterface, self).renderHTTP(ctx)
 
--- a/svgui/pyjs/lib/pyjslib.py	Wed Oct 11 13:55:56 2017 +0300
+++ b/svgui/pyjs/lib/pyjslib.py	Thu Oct 12 16:18:05 2017 +0300
@@ -12,6 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+# pylint: disable=too-many-function-args
 
 # iteration from Bob Ippolito's Iteration in JavaScript
 
--- a/tests/tools/check_source.sh	Wed Oct 11 13:55:56 2017 +0300
+++ b/tests/tools/check_source.sh	Thu Oct 12 16:18:05 2017 +0300
@@ -255,6 +255,7 @@
     enable=$enable,E0611          # (no-name-in-module) No name 'X' in module 'Y'
     enable=$enable,E0213          # (no-self-argument) Method should have "self" as first argument
     enable=$enable,E0401          # (import-error) Unable to import 'X'
+    enable=$enable,E1121          # (too-many-function-args) Too many positional arguments for function call
     # enable=
 
     options=