Re: [PATCH] scripts/kernel-doc: Fix kdoc for Python 3.9-3.11

From: Jonathan Corbet

Date: Fri Jul 31 2026 - 13:27:52 EST


Ryszard Knop <ryszard.knop@xxxxxxxxx> writes:

> The syntax used by the excess description suggestion change works on
> Python 3.12+, while we need to support 3.9+.
>
> Signed-off-by: Ryszard Knop <ryszard.knop@xxxxxxxxx>
> ---
> tools/lib/python/kdoc/kdoc_parser.py | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/lib/python/kdoc/kdoc_parser.py b/tools/lib/python/kdoc/kdoc_parser.py
> index 884f42584667..9cba20f827c4 100644
> --- a/tools/lib/python/kdoc/kdoc_parser.py
> +++ b/tools/lib/python/kdoc/kdoc_parser.py
> @@ -601,7 +601,8 @@ class KernelDoc:
> if not suggestions:
> return ""
>
> - return f"(did you mean one of: '{"', '".join(suggestions)}')"
> + joined_suggestions = "', '".join(suggestions)
> + return f"(did you mean one of: '{joined_suggestions}')"
>

Thanks, I'll get this applied shortly.

For future reference, it needs both Fixes and Reported-by tags; I'll add
those when I apply it.

jon