[elbe-devel] [PATCH 29/40] pylint: esoap - annotate or remove unused-parameters

Manuel Traut manut at linutronix.de
Fri Feb 8 10:06:22 CET 2019


Hi Torben,

On 11:05 Fri 23 Nov     , Manuel Traut wrote:
> This got accidently a 'Reviewed-by' tag and was merged.
> I'll address the review in a seperate patch soon.

The problem was that a parameter from the new_project SOAP interface
was removed:

> > > url_validation was really unused and therefor removed.

you considered, that the callers also need to be fixed up, what was
actually missing in the patch.

However the caller never used this parameter. So this should be fine
as is.

> > please use underscore for unused arguments.

I'll send a patch for this.

  Manu

> On 13:29 Thu 20 Sep     , Torben Hohn wrote:
> > On Fri, Sep 14, 2018 at 01:56:41PM +0200, Manuel Traut wrote:
> > > annotated ones are there for consinstency between other functions.
> > 
> > please use underscore for unused arguments.
> > > 
> > > url_validation was really unused and therefor removed.
> > > 
> > > Signed-off-by: Manuel Traut <manut at linutronix.de>
> > > ---
> > >  elbepack/daemons/soap/esoap.py | 9 +++++++--
> > >  1 file changed, 7 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/elbepack/daemons/soap/esoap.py b/elbepack/daemons/soap/esoap.py
> > > index 63dbc826..b973b592 100644
> > > --- a/elbepack/daemons/soap/esoap.py
> > > +++ b/elbepack/daemons/soap/esoap.py
> > > @@ -83,6 +83,7 @@ class ESoap (ServiceBase):
> > >      @authenticated_uid
> > >      @soap_faults
> > >      def get_files(self, uid, builddir, _returns=Array(SoapFile)):
> > > +        #pylint: disable=unused-argument
> > >          files = self.app.pm.db.get_project_files(builddir)
> > >          return [SoapFile(f) for f in files]
> > >  
> > > @@ -125,6 +126,7 @@ class ESoap (ServiceBase):
> > >      @authenticated_uid
> > >      @soap_faults
> > >      def get_file(self, uid, builddir, filename, part):
> > > +        #pylint: disable=unused-argument
> > >          size = 1024 * 1024 * 5
> > >          pos = size * part
> > >          file_name = builddir + "/" + filename
> > > @@ -303,6 +305,7 @@ class ESoap (ServiceBase):
> > >      @authenticated_uid
> > >      @soap_faults
> > >      def reset_project(self, uid, builddir):
> > > +        #pylint: disable=unused-argument
> > >          self.app.pm.db.reset_project(builddir, True)
> > >  
> > >      @rpc(String)
> > > @@ -323,10 +326,10 @@ class ESoap (ServiceBase):
> > >  
> > >          return prjid
> > >  
> > > -    @rpc(String, _returns=String)
> > > +    @rpc(_returns=String)
> > >      @authenticated_uid
> > >      @soap_faults
> > > -    def new_project(self, uid, url_validation):
> > > +    def new_project(self, uid):
> > >          return self.app.pm.new_project(uid)
> > 
> > you change the soap signature ...  is there a change in elbe control ?
> > 
> > >  
> > >      @rpc(String, Integer, _returns=String)
> > > @@ -346,6 +349,7 @@ class ESoap (ServiceBase):
> > >      @authenticated_uid
> > >      @soap_faults
> > >      def shutdown_initvm(self, uid):
> > > +        #pylint: disable=unused-argument
> > >          system("systemctl --no-block poweroff")
> > >  
> > >      @rpc(String)
> > > @@ -359,6 +363,7 @@ class ESoap (ServiceBase):
> > >      @authenticated_uid
> > >      @soap_faults
> > >      def list_packages(self, uid, builddir):
> > > +        #pylint: disable=unused-argument
> > >          s = ''
> > >          for _, _, filenames in os.walk(
> > >                  os.path.join(builddir, "repo/pool/main")):
> > > -- 
> > > 2.19.0.rc2
> > > 
> > 
> > -- 
> > Torben Hohn
> > Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
> > Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99
> > 
> > Hinweise zum Datenschutz finden Sie hier (Informations on data privacy 
> > can be found here): https://linutronix.de/kontakt/Datenschutz.php
> > 
> > Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen | 
> > Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700 
> > 806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner
> 
> 
> 
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel



More information about the elbe-devel mailing list