[elbe-devel] [PATCH] pylint: remove unused-arguments annotation

Manuel Traut manut at linutronix.de
Fri Feb 8 10:09:21 CET 2019


if a parameter starts with _ it is also not reported
in pylint. This is better readable than having the
annotations in the code.

Signed-off-by: Manuel Traut <manut at linutronix.de>
---
 elbepack/daemons/soap/esoap.py | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/elbepack/daemons/soap/esoap.py b/elbepack/daemons/soap/esoap.py
index e29d18a0..fc21bd61 100644
--- a/elbepack/daemons/soap/esoap.py
+++ b/elbepack/daemons/soap/esoap.py
@@ -115,8 +115,7 @@ class ESoap (ServiceBase):
     @rpc(String, String, _returns=Array(SoapFile))
     @authenticated_uid
     @soap_faults
-    def get_files(self, uid, builddir, _returns=Array(SoapFile)):
-        # pylint: disable=unused-argument
+    def get_files(self, _uid, builddir, _returns=Array(SoapFile)):
         files = self.app.pm.db.get_project_files(builddir)
         return [SoapFile(f) for f in files]
 
@@ -158,8 +157,7 @@ class ESoap (ServiceBase):
     @rpc(String, String, Integer, _returns=String)
     @authenticated_uid
     @soap_faults
-    def get_file(self, uid, builddir, filename, part):
-        # pylint: disable=unused-argument
+    def get_file(self, _uid, builddir, filename, part):
         size = 1024 * 1024 * 5
         pos = size * part
         file_name = builddir + "/" + filename
@@ -337,8 +335,7 @@ class ESoap (ServiceBase):
     @rpc(String)
     @authenticated_uid
     @soap_faults
-    def reset_project(self, uid, builddir):
-        # pylint: disable=unused-argument
+    def reset_project(self, _uid, builddir):
         self.app.pm.db.reset_project(builddir, True)
 
     @rpc(String)
@@ -381,8 +378,7 @@ class ESoap (ServiceBase):
     @rpc()
     @authenticated_uid
     @soap_faults
-    def shutdown_initvm(self, uid):
-        # pylint: disable=unused-argument
+    def shutdown_initvm(_self, _uid):
         system("systemctl --no-block poweroff")
 
     @rpc(String)
@@ -395,8 +391,7 @@ class ESoap (ServiceBase):
     @rpc(String, _returns=String)
     @authenticated_uid
     @soap_faults
-    def list_packages(self, uid, builddir):
-        # pylint: disable=unused-argument
+    def list_packages(_self, _uid, builddir):
         s = ''
         for _, _, filenames in os.walk(
                 os.path.join(builddir, "repo/pool/main")):
-- 
2.20.1




More information about the elbe-devel mailing list