On Fri, Nov 30, 2018 at 10:04 PM Markus Neteler <[email protected]> wrote:
>
> Hi devs,
>
> in several Python scripts tabs and spaces are mixed which is a problem.
>
> Questions:
> - how to find these problems: with pylint, recursively?

Here an (overly) simple approach:

for i in $(ag --python -l) ; do pylint-3 --errors-only $i | grep
'inconsistent use of tabs and spaces in indentation' && echo $i ; done
E:161, 0: inconsistent use of tabs and spaces in indentation
(<string>, line 161) (syntax-error)
scripts/v.rast.stats/v.rast.stats.py
E: 40, 0: inconsistent use of tabs and spaces in indentation
(<string>, line 40) (syntax-error)
raster/r.reclass/testsuite/test_r_reclass.py

(the first has just been fixed by Anna)

> - how to avoid them? Perhaps we collect the respective editor settings
> in a Wiki page?

Markus
_______________________________________________
grass-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to