Skip to content

Commit 26567aa

Browse files
authored
Remove unneccessary imports (#1637)
Remove unneccessary imports SUMMARY ansible-collections/news-for-maintainers#34 ISSUE TYPE Bugfix Pull Request COMPONENT NAME various ADDITIONAL INFORMATION
1 parent c4373d5 commit 26567aa

File tree

5 files changed

+7
-38
lines changed

5 files changed

+7
-38
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
bugfixes:
2+
- various - Fix new pylint issues (https://github.com/ansible-collections/community.vmware/pull/1637).

plugins/module_utils/version.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
from ansible.module_utils.six import raise_from
1313

1414
try:
15-
from ansible.module_utils.compat.version import LooseVersion # noqa: F401
15+
from ansible.module_utils.compat.version import LooseVersion # noqa: F401, pylint: disable=unused-import
1616
except ImportError:
1717
try:
1818
from distutils.version import LooseVersion # noqa: F401
1919
except ImportError as exc:
2020
raise_from(ImportError('To use this plugin or module with ansible-core < 2.11, you need to use Python < 3.12 with distutils.version present'), exc)
2121

2222
try:
23-
from ansible.module_utils.compat.version import StrictVersion # noqa: F401
23+
from ansible.module_utils.compat.version import StrictVersion # noqa: F401, pylint: disable=unused-import
2424
except ImportError:
2525
try:
2626
from distutils.version import StrictVersion # noqa: F401

plugins/module_utils/vmware_rest_client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020

2121
PYVMOMI_IMP_ERR = None
2222
try:
23-
from pyVim import connect # noqa: F401
24-
from pyVmomi import vim # noqa: F401
23+
from pyVim import connect # noqa: F401, pylint: disable=unused-import
24+
from pyVmomi import vim # noqa: F401, pylint: disable=unused-import
2525
HAS_PYVMOMI = True
2626
except ImportError:
2727
PYVMOMI_IMP_ERR = traceback.format_exc()

scripts/inventory/vmware.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def emit(self, record):
6060

6161
from psphere.client import Client
6262
from psphere.errors import ObjectNotFoundError
63-
from psphere.managedobjects import HostSystem, VirtualMachine, ManagedObject, Network, ClusterComputeResource
63+
from psphere.managedobjects import HostSystem, VirtualMachine, ManagedObject, ClusterComputeResource
6464
from suds.sudsobject import Object as SudsObject
6565

6666

tests/unit/compat/builtins.py

-33
This file was deleted.

0 commit comments

Comments
 (0)