[elbe-devel] [PATCH 07/40] pylint: disable too many arguments error

Torben Hohn torben.hohn at linutronix.de
Thu Sep 20 11:09:00 CEST 2018


On Fri, Sep 14, 2018 at 01:56:19PM +0200, Manuel Traut wrote:
> we don't want to disable the check globally because than we get no
> warnings for new code.
> 
> the existing code could be fixed later.

i actually dont see a way, how these occurences should be fixed.
i thought, that it could be done using *args, but that would trip the
spyne stuff.

> 
> Signed-off-by: Manuel Traut <manut at linutronix.de>

Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>

> ---
>  elbepack/daemons/soap/authentication.py | 2 ++
>  elbepack/daemons/soap/faults.py         | 2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/elbepack/daemons/soap/authentication.py b/elbepack/daemons/soap/authentication.py
> index 5e42fb3d..76946cbc 100644
> --- a/elbepack/daemons/soap/authentication.py
> +++ b/elbepack/daemons/soap/authentication.py
> @@ -78,6 +78,7 @@ def authenticated_uid(func):
>      elif func.__code__.co_argcount == 7:
>          @wraps(func)
>          def wrapped(self, arg1, arg2, arg3, arg4, arg5):
> +            # pylint: disable=too-many-arguments
>              s = self.transport.req_env['beaker.session']
>              try:
>                  uid = s['userid']
> @@ -145,6 +146,7 @@ def authenticated_admin(func):
>      elif func.__code__.co_argcount == 6:
>          @wraps(func)
>          def wrapped(self, arg1, arg2, arg3, arg4, arg5):
> +            # pylint: disable=too-many-arguments
>              s = self.transport.req_env['beaker.session']
>              try:
>                  uid = s['userid']
> diff --git a/elbepack/daemons/soap/faults.py b/elbepack/daemons/soap/faults.py
> index c56d1bd0..1ed46e19 100644
> --- a/elbepack/daemons/soap/faults.py
> +++ b/elbepack/daemons/soap/faults.py
> @@ -175,6 +175,7 @@ def soap_faults(func):
>      if func.__code__.co_argcount == 6:
>          @wraps(func)
>          def wrapped(self, arg1, arg2, arg3, arg4, arg5):
> +            # pylint: disable=too-many-arguments
>              try:
>                  return func(self, arg1, arg2, arg3, arg4, arg5)
>              except InvalidState as e:
> @@ -195,6 +196,7 @@ def soap_faults(func):
>      if func.__code__.co_argcount == 7:
>          @wraps(func)
>          def wrapped(self, arg1, arg2, arg3, arg4, arg5, arg6):
> +            # pylint: disable=too-many-arguments
>              try:
>                  return func(self, arg1, arg2, arg3, arg4, arg5, arg6)
>              except InvalidState as e:
> -- 
> 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
-------------- 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/20180920/eb674660/attachment-0001.sig>


More information about the elbe-devel mailing list