[PATCH 03/22] python/qapi: delint import statements

John Snow posted 22 patches 2 days, 17 hours ago
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Thomas Huth <thuth@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, John Snow <jsnow@redhat.com>, Cleber Rosa <crosa@redhat.com>, Markus Armbruster <armbru@redhat.com>, Michael Roth <michael.roth@amd.com>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>
[PATCH 03/22] python/qapi: delint import statements
Posted by John Snow 2 days, 17 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>
---
 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 03/22] python/qapi: delint import statements
Posted by Thomas Huth 2 days, 5 hours ago
On 17/11/2025 19.51, 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
> Signed-off-by: John Snow <jsnow@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 (

Reviewed-by: Thomas Huth <thuth@redhat.com>