Re: [PATCH] tests/functional: fix pylint false positives for cv2 module
Thomas Huth <[email protected]>
| Newsgroups | gmane.comp.emulators.qemu |
|---|---|
| Message-ID | <[email protected]> |
On 15/08/2026 09.24, [email protected] wrote: > From: Marc-André Lureau <[email protected]> > > Add generated-members=cv2.* to pylintrc so pylint skips member > checking on the cv2 C extension module, whose members are not > visible to static analysis. > > Silence: > 2026-08-15 10:42:08,710 - INFO: qemu-test.test_pylint Checking files in /home/elmarco/src/qemu.qom-qapi/tests/functional/arm with pylint > 2026-08-15 10:42:10,941 - ERROR: qemu-test.test_pylint "/home/elmarco/src/qemu.qom-qapi/tests/functional/arm/test_integratorcp.py:83: E1101: Module 'cv2' has no 'imread' member (no-member)" Alex recently already sent a patch for that error here: https://gitlab.com/qemu-project/qemu/-/commit/dd14a21b9dc1 Didn't that help to silence the message in your case, too? Thomas > Note: I also tried with extension-pkg-allow-list, but that didn't work > for some reason. > > Signed-off-by: Marc-André Lureau <[email protected]> > --- > tests/functional/pylintrc | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/tests/functional/pylintrc b/tests/functional/pylintrc > index 949bea611fe4..373aabd6ca3f 100644 > --- a/tests/functional/pylintrc > +++ b/tests/functional/pylintrc > @@ -79,6 +79,12 @@ disable=bad-inline-option, > useless-suppression, > > > +[TYPECHECK] > + > +# cv2 is a C extension module whose members are not visible to pylint > +generated-members=cv2.* > + > + > [SIMILARITIES] > > # Minimum lines number of a similarity.