Repository navigation
Conversation
aexpect is a declared runtime dependency of avocado-vt (>=1.6.4) but was not installed in the pre-commit pylint hook's isolated environment. This caused E0401 (import-error) for any virttest file that imports aexpect, since pylint could not resolve the module during static analysis. Add aexpect>=1.6.4 to additional_dependencies so the hook environment mirrors the declared runtime requirements. Signed-off-by: Misbah Anjum N <misanjumn@ibm.com>
ProblemThe pre-commit pylint hook runs in an isolated Python environment (created by pre-commit from This surfaced in avocado-framework/avocado-vt#4378, which introduces virttest/utils_kdump.py, the first file in virttest/ that both imports aexpect and is fully checked by pylint (other files that import aexpect, such as virt_vm.py and utils_disk.py, are in the pylint ignore list). FixAdd ImpactAny current or future virttest file that imports aexpect will now be correctly resolved by pylint without needing to be added to the ignore list as a workaround. Referenceavocado-framework/avocado-vt#4378 (the PR that exposed this issue) |
|
@misanjumn Do you think you will be able to assist us with re-enabling other files once we merge this? I believe we have a multitude of such files desabled for this exact reason. |
fix(pylint): add aexpect to pylint hook's additional_dependencies
aexpect is a declared runtime dependency of avocado-vt (>=1.6.4) but was not installed in the pre-commit pylint hook's isolated environment. This caused E0401 (import-error) for any virttest file that imports aexpect, since pylint could not resolve the module during static analysis.
Add aexpect>=1.6.4 to additional_dependencies so the hook environment mirrors the declared runtime requirements.
Signed-off-by: Misbah Anjum N misanjum@linux.ibm.com