Skip to contentSkip to conversation

tests/functional: tell pylint not to check c-modules

RFC PATCH In review Alex Bennée 2 participants 2 messages Jun 12

lore
Share & tools
lore
#0 lore raw

RFC PATCH v2 1/1 tests/functional: tell pylint not to check c-modules

To fix:

qemu-test.test_pylint "/home/alex/lsrc/qemu.git/tests/functional/arm/test_integratorcp.py:83: I1101: Module 'cv2' has no 'imread' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member)"

Manually running python3 showed I could indeed import cv2 and call those functions. Rather than allowing pylint to introspect lets just tell it to skip c modules.

---
 tests/functional/pylintrc | 1 +
 1 file changed, 1 insertion(+)
tests/functional/pylintrc +1 -0
index 049c3e76f12..949bea611fe 100644
@@ -58,6 +58,7 @@ confidence=HIGH,
 # no Warning level messages displayed, use "--disable=all --enable=classes
 # --disable=W".
 disable=bad-inline-option,
+        c-extension-no-member,
         consider-using-f-string,
         file-ignored,
         fixme,
Signature · 1 line
2.47.3
Reviewed-by on v2 1/1
#1 lore raw
Quoted 4 lines · Alex Bennée

To fix:

qemu-test.test_pylint "/home/alex/lsrc/qemu.git/tests/functional/arm/test_integratorcp.py:83: I1101: Module 'cv2' has no 'imread' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member)"

Quoted 8 lines

Manually running python3 showed I could indeed import cv2 and call those functions. Rather than allowing pylint to introspect lets just tell it to skip c modules.

---
 tests/functional/pylintrc | 1 +
 1 file changed, 1 insertion(+)

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|