Python warning: lyx_pot.py:607: SyntaxWarning: invalid escape sequence '\w'
José Matos
jaomatos at gmail.com
Sat Jun 8 20:27:19 UTC 2024
On Sat, 2024-06-08 at 12:14 -0400, Scott Kostyshak wrote:
> Another question: from googling it seems that the command
>
> python -W error foobar.py
>
> would give an error (which hopefully would stop the build).
According to the man page there is no space in between, it should be -
Werror or even -We.
But just like for C++ code I prefer for the warning to be a warning.
:-)
> I haven't tested, but would the way to ask our build systems to use
> the flag be to use the PYTHON environment variable? (./configure --
> help tells me this is used)?
Please no, I am still traumatized with our use of python -tt (that by
the way is a no-op in Python 3). :-)
Thus I intend to remove -tt from existence in our code (development).
> I'm pretending that I will add this flag, but I'm secretly hoping you
> will add it and fix all warnings before I even see them ;)
>
> Scott
BTW in the case that you have fixed there were several problems, \w is
just the first of them.
Actually every use of the backslash in that string was a problem (and
there are 17 in there).
And you are right, linters are very good at catching those cases (here
I get that directly indication both with emacs and kate, using
plugins).
--
José Abílio
More information about the lyx-devel
mailing list