Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
alisonlhart opened this issue Sep 14, 2023 · 3 comments · Fixed by #495
Closed

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

alisonlhart opened this issue Sep 14, 2023 · 3 comments · Fixed by #495
Labels
bug Something isn't working released

Comments

@alisonlhart
Copy link
Contributor

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

@alisonlhart alisonlhart added the bug Something isn't working label Sep 14, 2023
@welcome-to-palo-alto-networks

🎉 Thanks for opening your first issue here! Welcome to the community!

@jamesholland-uk
Copy link
Member

Thanks for letting us know about this @alisonlhart, we'll progress it to conclusion 👍

@github-actions
Copy link

github-actions bot commented Oct 5, 2023

🎉 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants