[elbe-devel] [PATCH 03/75] .pylintrc: Add disabling option and pkg whitelist

Torben Hohn torben.hohn at linutronix.de
Fri May 29 10:44:31 CEST 2020


On Mon, May 25, 2020 at 11:41:56AM -0400, Olivier Dion wrote:
> lxml is a C based package.  Adding it to the white list.
> 
> Disabling check for:
> 
>   - import-error; because host might not have python-apt for example.
>     Tho this could be useful on the guest side.

Please dont disable this one.
It can find typos.
There are some import errors, but they can be marked in the source code.
That is perfectly fine.

> 
>   - fixme; TODO comments should not make tests fail.

lets do this on the commandline, because they should not make the tests
fail, but they should show up, on a normal run, when one just runs
pylint to check syntax, and stuff.

> 
>   - duplicate-code; Seems like a bug in pylint that messed up with
>     importation and think there's duplicate-code.  There's is however
>     duplicate code in Elbe, but I don't think it's that much of a
>     problem.

Same for this one -> commandline 

BTW: i have this script that i run from vim for a py file:

-------------------------------------------------------------------------------------------------
#!/bin/sh

pylint -f parseable \
       --reports=no \
       --extension-pkg-whitelist=apt_pkg,gpg.constants,lxml.etree,_ped \
       --generated-members=,gpgme.SIG_MODE_NORMAL \
       --disable I0011 \
       "$@"

pycodestyle "$@"
-------------------------------------------------------------------------------------------------

> 
> Signed-off-by: Olivier Dion <dion at linutronix.de>
> ---
>  .pylintrc | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/.pylintrc b/.pylintrc
> index d3c9cb18..b516d511 100644
> --- a/.pylintrc
> +++ b/.pylintrc
> @@ -27,6 +27,8 @@ persistent=yes
>  # usually to register additional checkers.
>  load-plugins=
>  
> +extension-pkg-whitelist=lxml
> +
>  
>  [MESSAGES CONTROL]
>  
> @@ -39,7 +41,8 @@ load-plugins=
>  # can either give multiple identifier separated by comma (,) or put this option
>  # multiple time (only on the command line, not in the configuration file where
>  # it should appear only once).
> -disable=bad-whitespace,missing-docstring,bad-continuation,invalid-name,line-too-long,too-few-public-methods
> +
> +disable=bad-whitespace,missing-docstring,bad-continuation,invalid-name,line-too-long,too-few-public-methods,import-error,fixme,duplicate-code
>  
>  
>  [REPORTS]
> -- 
> 2.26.2
> 
> 
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel

-- 
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



More information about the elbe-devel mailing list