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

Torben Hohn torben.hohn at linutronix.de
Fri Feb 8 13:11:32 CET 2019


On Fri, Feb 08, 2019 at 10:09:21AM +0100, Manuel Traut wrote:
> if a parameter starts with _ it is also not reported
> in pylint. This is better readable than having the
> annotations in the code.

the underscore does not work with self.
this yields another error.

> [...]
> 
> @@ -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
> 

-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.linutronix.de/pipermail/elbe-devel/attachments/20190208/ba2152bc/attachment.sig>


More information about the elbe-devel mailing list