]> git.ipfire.org Git - thirdparty/libvirt.git/commit
python: Do not explicitly state variables are global when only read
authorMartin Kletzander <mkletzan@redhat.com>
Wed, 16 Apr 2025 07:59:44 +0000 (09:59 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Wed, 16 Apr 2025 08:14:40 +0000 (10:14 +0200)
commit750eaf2243941b73a70d1c7a6dd14d5230c18a3a
tree5e103c395c2673db55d56e9a26de1a34aa93a4c3
parentab1218c610758ce43516f690dc2136d00d859a07
python: Do not explicitly state variables are global when only read

If a variable is not modified in a scope there is no need for the use of
global in such scope.  Without this patch build fails with:

F824 `global ...` is unused: name is never assigned in scope

It is a bit difficult to find more information on that message and error
code, I found it here:

    https://docs.astral.sh/ruff/rules/global-variable-not-assigned/

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
scripts/apibuild.py
tools/virt-qemu-qmp-proxy