Yes it was. I was mentioning the SyntaxWarnings which were introduced in python3.8 - which was the thread opener's initial question.PMac wrote: ↑Tue Apr 07, 2020 4:54 pmHi Reox, Not sure if your post was meant for this thread. Way beyond my initial reported fault as I'm not compiling locally. Maybe someone else could help?reox wrote: ↑Sun Apr 05, 2020 11:42 am There are much more of the SyntaxWarnings.
But I have not found a good way to find them statically in the code. Does anyone know a method for that? I tried it with pylint but it looks like you can not find them that way.
With a static code analyzer it would probably be very easy to find all those warnings and resolve them.
The idea would be to get rid of all these SyntaxWarnings at once, however therefore they must be found. And I'm not sure if there are static code analyzers which are able to do this - so far, I found none. Maybe these SyntaxWarnings are just too new and the tools havn't adopted yet.
edit: no wait, you can get them via pylint. But they are just recommendations:
Code: Select all
find . -name \*.py -exec pylint --disable=all --enable=R0123 --score=no {} \; | tee -a pylint_R0123.txt
************* Module feminout.writeFenicsXDMF
src/Mod/Fem/feminout/writeFenicsXDMF.py:320:7: R0123: Comparison to literal (literal-comparison)
************* Module feminout.importFenicsMesh
src/Mod/Fem/feminout/importFenicsMesh.py:189:15: R0123: Comparison to literal (literal-comparison)
************* Module femexamples.manager
src/Mod/Fem/femexamples/manager.py:70:7: R0123: Comparison to literal (literal-comparison)
src/Mod/Fem/femexamples/manager.py:81:16: R0123: Comparison to literal (literal-comparison)