]> git.feebdaed.xyz Git - 0xmirror/qemu.git/commit
python/mkvenv: ensure HAVE_LIB variables are actually constants
authorJohn Snow <jsnow@redhat.com>
Tue, 18 Nov 2025 20:06:55 +0000 (15:06 -0500)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 19 Nov 2025 09:45:44 +0000 (10:45 +0100)
commit9ccd0c8a88af80f467633ca99ad7adcf513f976e
tree1f8dc99982523a50eebf5fab56d493d65373575f
parent5e0242e9a847b5d17b87be80b70c5dbe45bbcdc7
python/mkvenv: ensure HAVE_LIB variables are actually constants

Pylint 4.x has refined checking for variable names that behave as
constants vs ones that do not; unfortunately our tricky import machinery
is perceived as these variables being re-assigned.

Add a temporary variable with an underscore and assign to the global
constants precisely once to alleviate this new nag message. Add an
ignore for this name for older versions of pylint that developers may
have installed locally.

(In other words: there is no solution that will cater to both pre- and
post- 4.x versions, so we target 4.x here and silence older versions.)

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251118200657.1043688-2-jsnow@redhat.com>
python/scripts/mkvenv.py
python/setup.cfg