[PATCH] tools/docs: sphinx-build-wrapper: -q is a boolean, not an integer

Mauro Carvalho Chehab posted 1 patch 4 months ago
tools/docs/sphinx-build-wrapper | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] tools/docs: sphinx-build-wrapper: -q is a boolean, not an integer
Posted by Mauro Carvalho Chehab 4 months ago
As reported by Konstantin, sphinx-build -q is a boolean, not an integer.

Fix the code.

Reported-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Closes: https://lore.kernel.org/all/871pnepxfy.fsf@trenco.lwn.net/
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 tools/docs/sphinx-build-wrapper | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/docs/sphinx-build-wrapper b/tools/docs/sphinx-build-wrapper
index a74998e8309a..3e6d166d4102 100755
--- a/tools/docs/sphinx-build-wrapper
+++ b/tools/docs/sphinx-build-wrapper
@@ -141,7 +141,7 @@ class SphinxBuilder:
         #
         parser = argparse.ArgumentParser()
         parser.add_argument('-j', '--jobs', type=int)
-        parser.add_argument('-q', '--quiet', type=int)
+        parser.add_argument('-q', '--quiet', action='store_true')
 
         #
         # Other sphinx-build arguments go as-is, so place them
-- 
2.51.0
Re: [PATCH] tools/docs: sphinx-build-wrapper: -q is a boolean, not an integer
Posted by Jonathan Corbet 4 months ago
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> writes:

> As reported by Konstantin, sphinx-build -q is a boolean, not an integer.
>
> Fix the code.
>
> Reported-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
> Closes: https://lore.kernel.org/all/871pnepxfy.fsf@trenco.lwn.net/
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> ---
>  tools/docs/sphinx-build-wrapper | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/docs/sphinx-build-wrapper b/tools/docs/sphinx-build-wrapper
> index a74998e8309a..3e6d166d4102 100755
> --- a/tools/docs/sphinx-build-wrapper
> +++ b/tools/docs/sphinx-build-wrapper
> @@ -141,7 +141,7 @@ class SphinxBuilder:
>          #
>          parser = argparse.ArgumentParser()
>          parser.add_argument('-j', '--jobs', type=int)
> -        parser.add_argument('-q', '--quiet', type=int)
> +        parser.add_argument('-q', '--quiet', action='store_true')

Applied to the build-script branch, thanks.

jon
Re: [PATCH] tools/docs: sphinx-build-wrapper: -q is a boolean, not an integer
Posted by Konstantin Ryabitsev 4 months ago
On Tue, Oct 07, 2025 at 05:43:12PM +0200, Mauro Carvalho Chehab wrote:
> As reported by Konstantin, sphinx-build -q is a boolean, not an integer.
> 
> Fix the code.
> 
> Reported-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>

Reviewed-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>

-K