qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: qemu-devel@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>,
	"Daniel P . Berrangé" <berrange@redhat.com>,
	"John Snow" <jsnow@redhat.com>, "Kevin Wolf" <kwolf@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Mads Ynddal" <mads@ynddal.dk>
Subject: Re: [PATCH 2/6] tracetool: apply isort and add check
Date: Thu, 9 Oct 2025 09:58:28 +0200	[thread overview]
Message-ID: <CABgObfYUa=8hp7sHm7STQMD6t5yJtdDPZ_corm++RRSm8v2=PA@mail.gmail.com> (raw)
In-Reply-To: <20251008175811.GB181748@fedora>

On Wed, Oct 8, 2025 at 7:58 PM Stefan Hajnoczi <stefanha@redhat.com> wrote:
>
> On Wed, Oct 08, 2025 at 08:35:41AM +0200, Paolo Bonzini wrote:
> > Sort imports automatically, to keep the coding style more uniform.
> >
> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> > ---
> >  python/tests/tracetool-isort.sh      | 4 ++++
> >  scripts/tracetool.py                 | 5 ++---
> >  scripts/tracetool/backend/dtrace.py  | 1 -
> >  scripts/tracetool/backend/ftrace.py  | 3 +--
> >  scripts/tracetool/backend/log.py     | 3 +--
> >  scripts/tracetool/backend/simple.py  | 1 -
> >  scripts/tracetool/backend/syslog.py  | 3 +--
> >  scripts/tracetool/backend/ust.py     | 1 -
> >  scripts/tracetool/format/d.py        | 2 +-
> >  scripts/tracetool/format/log_stap.py | 1 -
> >  scripts/tracetool/format/stap.py     | 1 -
> >  11 files changed, 10 insertions(+), 15 deletions(-)
> >  create mode 100755 python/tests/tracetool-isort.sh
> >
> > diff --git a/python/tests/tracetool-isort.sh b/python/tests/tracetool-isort.sh
> > new file mode 100755
> > index 00000000000..b23f3d48448
> > --- /dev/null
> > +++ b/python/tests/tracetool-isort.sh
> > @@ -0,0 +1,4 @@
> > +#!/bin/sh -e
> > +# SPDX-License-Identifier: GPL-2.0-or-later
> > +
> > +python3 -m isort --sp . -c ../scripts/tracetool/
>
> I wonder why python/tests/isort.sh doesn't already cover this with its
> `python3 -m isort -c scripts/` line?

Because that one is for python/scripts. Not sure why John placed
mkvenv.py and venv.py in python/scripts, but the potential for
confusion is real.

> Also, why the --settings-path (--sp) option that python/tests/isort.sh
> doesn't use?

I honestly copied it from python/tests/qapi-isort.sh. I think it's
because python/scripts/ is a subdirectory of where python/setup.cfg
lives, but scripts/ is not.

> It would be great to have just 1 script that runs isort on all Python
> code in QEMU.

Yes, there's lots of room for cleanup there.

Paolo



  parent reply	other threads:[~2025-10-09  8:00 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-08  6:35 [PATCH 0/6] tracetool: add mypy --strict checking [AI discussion ahead!] Paolo Bonzini
2025-10-08  6:35 ` [PATCH 1/6] tracetool: rename variable with conflicting types Paolo Bonzini
2025-10-08  9:27   ` Daniel P. Berrangé
2025-10-08 18:06   ` Stefan Hajnoczi
2025-10-08  6:35 ` [PATCH 2/6] tracetool: apply isort and add check Paolo Bonzini
2025-10-08  9:29   ` Daniel P. Berrangé
2025-10-08 17:58   ` Stefan Hajnoczi
2025-10-09  7:52     ` Daniel P. Berrangé
2025-10-09  8:22       ` Paolo Bonzini
2025-10-09  8:58         ` Daniel P. Berrangé
2025-10-09 11:26           ` Paolo Bonzini
2025-10-09 12:05             ` Daniel P. Berrangé
2025-10-09  7:58     ` Paolo Bonzini [this message]
2025-10-08  6:35 ` [PATCH 3/6] tracetool: "import annotations" Paolo Bonzini
2025-10-08  9:31   ` Daniel P. Berrangé
2025-10-08 18:06   ` Stefan Hajnoczi
2025-10-08  6:35 ` [PATCH 4/6] tracetool: add type annotations Paolo Bonzini
2025-10-08 18:09   ` Stefan Hajnoczi
2025-10-08  6:35 ` [PATCH 5/6] tracetool: complete typing annotations Paolo Bonzini
2025-10-08 18:10   ` Stefan Hajnoczi
2025-10-08  6:35 ` [PATCH 6/6] tracetool: add typing checks to "make -C python check" Paolo Bonzini
2025-10-08  9:32   ` Daniel P. Berrangé
2025-10-08 18:12   ` Stefan Hajnoczi
2025-10-08  7:18 ` [PATCH 0/6] tracetool: add mypy --strict checking [AI discussion ahead!] Markus Armbruster
2025-10-08 10:34   ` Daniel P. Berrangé
2025-10-10 12:38     ` Markus Armbruster
2025-10-10 13:49       ` Paolo Bonzini
2025-10-10 17:41         ` Markus Armbruster
2025-10-08 10:40 ` Daniel P. Berrangé
2025-10-08 17:23 ` Stefan Hajnoczi
2025-10-08 17:41   ` Paolo Bonzini
2025-10-14 19:02 ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABgObfYUa=8hp7sHm7STQMD6t5yJtdDPZ_corm++RRSm8v2=PA@mail.gmail.com' \
    --to=pbonzini@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mads@ynddal.dk \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).