On 30 Oct 2023, at 21:10, Ilya Maximets wrote:
> A few general style issues like extra spacing and lines being too long,
> unused variable 'error_types', passing more arguments than a format
> string has. And a few invalid escape sequences, which are not actual
> escape sequences, but cause actual syntax warnings starting python 3.12
> and will eventually become syntax errors [1]:
>
> extract-ofp-errors:244: SyntaxWarning: invalid escape sequence '\.'
> m = re.match('Expected: (.*)\.$', comment)
> extract-ofp-errors:249: SyntaxWarning: invalid escape sequence '\.'
> m = re.match('((?:.(?!\. ))+.)\.\s+(.*)$', comment)
> extract-ofp-errors:256: SyntaxWarning: invalid escape sequence '\s'
> m = re.match('\s+(?:OFPERR_([A-Z0-9_]+))(\s*=\s*OFPERR_OFS)?,',
> extract-ofp-errors:265: SyntaxWarning: invalid escape sequence '\['
> comments.append(re.sub('\[[^]]*\]', '', comment))
>
> These are fixed by converting to raw strings.
>
> [1] https://docs.python.org/3/reference/lexical_analysis.html#escape-sequences
>
> Signed-off-by: Ilya Maximets <[email protected]>
Thanks for fixing this, and the changes look good to me.
Acked-by: Eelco Chaudron <[email protected]>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev