Thread (8 messages) 8 messages, 5 authors, 2023-08-31

Re: [PATCH v2] Fix invalid escape sequence warnings

From: Quentin Monnet <hidden>
Date: 2023-08-30 18:34:17
Also in: bpf, lkml

On 29/08/2023 08:49, Vishal Chourasia wrote:
The script bpf_doc.py generates multiple SyntaxWarnings related to invalid
escape sequences when executed with Python 3.12. These warnings do not appear in
Python 3.10 and 3.11 and do not affect the kernel build, which completes
successfully.

This patch resolves these SyntaxWarnings by converting the relevant string
literals to raw strings or by escaping backslashes. This ensures that
backslashes are interpreted as literal characters, eliminating the warnings.

Signed-off-by: Vishal Chourasia <redacted>
Reported-by: Srikar Dronamraju <redacted>
Thanks! I observed that this patch fixes warnings reported by pyright in
my editor. I've also validated that the generated files (helpers man
page, syscall man page, bpf_helper_defs.h) remain unchanged.

Tested-by: Quentin Monnet <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help