Patches for Python scripts
José Abílio Matos
jamatos at lyx.org
Fri Jan 29 11:07:43 UTC 2021
On Friday, January 29, 2021 5:05:19 AM WET Richard Kimberly Heck wrote:
> José, can you look at these please?
I think that Thibaut wants to impose black on us. :-D
Most of the changes are cosmetic, e.g. one import per line, or to use the same
indentation for documentation.
The only bits where I am unsure are on the regular expressions (I am trimming
the expression to make it easier to read):
- declare = re.compile('\\s*(\[([^,]*)(,.*)*\])*$')
+ declare = re.compile('\\s*(\[([^,]*)(,.*)*])*$')
The left bracket is escaped but not the right one. What do other, more
knowledgeable about the black magic of regular expressions think?
The are other issues like mistakes in the documentation strings. For the
moment those are harmless, I am referring to e.g. "\c" since \c it is not an
escape sequence it gets transformed to "\\c".
With the extent of the patches I fear that there could be bugs (unintended
changes) lurking specially in relation to python 2.
In particular this just reinforces my feeling that configure.py should get an
This is my preliminary overview. I will keep looking into the patches.
 From Henry Ford's T model "You can choose any color as long as it is
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the lyx-devel