[PATCH 3/3] python/qapi: delint import statements

John Snow posted 3 patches 1 day, 16 hours ago
Maintainers: John Snow <jsnow@redhat.com>, Cleber Rosa <crosa@redhat.com>, Markus Armbruster <armbru@redhat.com>, Michael Roth <michael.roth@amd.com>
[PATCH 3/3] python/qapi: delint import statements
Posted by John Snow 1 day, 16 hours ago
Missed a spot with isort, which now causes the python-minreqs test on
GitLab to fail. Fix it.

(Hint: the commands in python/tests/qapi-isort.sh can be run without the
"-c" parameter to automatically adjust import statements according to
our style rules. Maybe I should make a pre-submit hook that makes this
adjustment automatically. What do you think?)

Fixes: 5bd89761
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
 scripts/qapi/commands.py | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/scripts/qapi/commands.py b/scripts/qapi/commands.py
index a82b5a2a5e6..9dede747205 100644
--- a/scripts/qapi/commands.py
+++ b/scripts/qapi/commands.py
@@ -13,10 +13,7 @@
 See the COPYING file in the top-level directory.
 """
 
-from typing import (
-    List,
-    Optional,
-)
+from typing import List, Optional
 
 from .common import c_name, mcgen
 from .gen import (
-- 
2.51.1
Re: [PATCH 3/3] python/qapi: delint import statements
Posted by Philippe Mathieu-Daudé 1 day, 16 hours ago
On 18/11/25 21:06, John Snow wrote:
> Missed a spot with isort, which now causes the python-minreqs test on
> GitLab to fail. Fix it.
> 
> (Hint: the commands in python/tests/qapi-isort.sh can be run without the
> "-c" parameter to automatically adjust import statements according to
> our style rules. Maybe I should make a pre-submit hook that makes this
> adjustment automatically. What do you think?)
> 
> Fixes: 5bd89761

Fixes: 5bd89761a4b ("qapi/command: Avoid generating unused 
qmp_marshal_output_T")

See Laurent's tips:
https://lore.kernel.org/qemu-devel/6c69b3b6-f1f0-da38-d47a-dba01e33bd6a@redhat.com/

> Signed-off-by: John Snow <jsnow@redhat.com>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> ---
>   scripts/qapi/commands.py | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>