mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-04-14 12:51:17 +00:00
Remove unneccessary imports (#569)
* Remove unneccessary imports. * Add noqas. * Add comment which name is actually ignored.
This commit is contained in:
2
changelogs/fragments/remove-unneeded-imports.yml
Normal file
2
changelogs/fragments/remove-unneeded-imports.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- "various plugins - remove unnecessary imports (https://github.com/ansible-collections/community.crypto/pull/569)."
|
||||
@@ -144,7 +144,7 @@ import binascii
|
||||
|
||||
from ansible.errors import AnsibleFilterError
|
||||
from ansible.module_utils.six import string_types
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_native
|
||||
|
||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
||||
OpenSSLObjectError,
|
||||
|
||||
@@ -46,7 +46,7 @@ from ansible_collections.community.crypto.plugins.module_utils.acme.utils import
|
||||
)
|
||||
|
||||
try:
|
||||
import ipaddress
|
||||
import ipaddress # noqa: F401, pylint: disable=unused-import
|
||||
except ImportError:
|
||||
HAS_IPADDRESS = False
|
||||
IPADDRESS_IMPORT_ERROR = traceback.format_exc()
|
||||
|
||||
@@ -8,6 +8,6 @@ from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
# This import is only to maintain backwards compatibility
|
||||
from ansible_collections.community.crypto.plugins.module_utils.openssh.utils import (
|
||||
from ansible_collections.community.crypto.plugins.module_utils.openssh.utils import ( # noqa: F401, pylint: disable=unused-import
|
||||
parse_openssh_version
|
||||
)
|
||||
|
||||
@@ -15,4 +15,4 @@ __metaclass__ = type
|
||||
#
|
||||
# from ansible.module_utils.compat.version import LooseVersion
|
||||
|
||||
from ._version import LooseVersion
|
||||
from ._version import LooseVersion # noqa: F401, pylint: disable=unused-import
|
||||
|
||||
@@ -69,9 +69,9 @@ try:
|
||||
# For ansible-core 2.11, we can use the ArgumentSpecValidator. We also import
|
||||
# ModuleArgumentSpecValidator since that indicates that the 'classical' approach
|
||||
# will no longer work.
|
||||
from ansible.module_utils.common.arg_spec import (
|
||||
from ansible.module_utils.common.arg_spec import ( # noqa: F401, pylint: disable=unused-import
|
||||
ArgumentSpecValidator,
|
||||
ModuleArgumentSpecValidator, # noqa
|
||||
ModuleArgumentSpecValidator, # ModuleArgumentSpecValidator is not used
|
||||
)
|
||||
from ansible.module_utils.errors import UnsupportedError
|
||||
HAS_ARGSPEC_VALIDATOR = True
|
||||
|
||||
Reference in New Issue
Block a user