PaloAltoNetworks/pan-os-ansible

ansible-test sanity failures - "pylint:unused-import"

alisonlhart opened this issue ยท 3 comments

Describe the bug

Ansible-test sanity (ansible-core 2.15.x) is failing on the collection with some pylint:unused-import errors. It looks like the sanity GH workflow is using the --skip-test pylint flag, which is preventing these errors from showing in CI.

ERROR: plugins/module_utils/panos.py:40:0: unused-import: Unused ConnectionError imported from ansible.module_utils.connection
ERROR: plugins/modules/panos_export.py:202:4: unused-import: Unused PanDeviceError imported from panos.errors
ERROR: plugins/modules/panos_export.py:212:4: unused-import: Unused import pan.xapi
ERROR: plugins/modules/panos_export.py:220:0: unused-import: Unused import os
ERROR: plugins/modules/panos_facts.py:236:4: unused-import: Unused PanDeviceError imported from panos.errors
ERROR: plugins/modules/panos_import.py:208:4: unused-import: Unused import pan.xapi
ERROR: plugins/modules/panos_import.py:210:4: unused-import: Unused import requests_toolbelt
ERROR: plugins/modules/panos_object.py:259:4: unused-import: Unused import panos
ERROR: plugins/modules/panos_object.py:261:4: unused-import: Unused panorama imported from panos
ERROR: plugins/modules/panos_query_rules.py:150:4: unused-import: Unused import panos
ERROR: plugins/modules/panos_redistribution.py:140:4: unused-import: Unused RedistributionProfile imported from panos.network
ERROR: plugins/modules/panos_redistribution.py:140:4: unused-import: Unused RedistributionProfileIPv6 imported from panos.network
ERROR: plugins/modules/panos_redistribution.py:140:4: unused-import: Unused VirtualRouter imported from panos.network
ERROR: tests/unit/httpapi/test_panos.py:12:0: unused-import: Unused HTTPError imported from ansible.module_utils.six.moves.urllib.error
ERROR: tests/unit/plugins/module_utils/test_panos.py:20:0: unused-import: Unused Mock imported from unittest.mock
ERROR: tests/unit/plugins/module_utils/test_panos.py:24:0: unused-import: Unused ConnectionHelper imported from ansible_collections.paloaltonetworks.panos.plugins.module_utils.panos

Possible solution

Removing the imports, unless they are false flags. Please let me know if they appear to be false flags and Partner Engineering can provide approval for in-line ignores.

Steps to reproduce

Run ansible-test sanity --docker default with ansible-core 2.15.x.

Context

This test was enabled for collections earlier this year. See ansible-collections/news-for-maintainers#34.

Your Environment

ansible-core 2.15.x
paloaltonetworks.panos v2.17.6

๐ŸŽ‰ Thanks for opening your first issue here! Welcome to the community!

Thanks for letting us know about this @alisonlhart, we'll progress it to conclusion ๐Ÿ‘

๐ŸŽ‰ This issue has been resolved in version 2.17.7 ๐ŸŽ‰

The release is available on Ansible Galaxy and GitHub release

Posted by semantic-release bot