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

Remove unneccessary imports #569

Merged
merged 3 commits into from
Feb 9, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/fragments/remove-unneeded-imports.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- "various plugins - remove unnecessary imports (https:/ansible-collections/community.crypto/pull/569)."
2 changes: 1 addition & 1 deletion plugins/filter/x509_crl_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@

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,
Expand Down
2 changes: 1 addition & 1 deletion plugins/module_utils/acme/acme.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
)

try:
import ipaddress
import ipaddress # noqa: F401, pylint: disable=unused-import
except ImportError:
HAS_IPADDRESS = False
IPADDRESS_IMPORT_ERROR = traceback.format_exc()
Expand Down
2 changes: 1 addition & 1 deletion plugins/module_utils/crypto/openssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
__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
)
2 changes: 1 addition & 1 deletion plugins/module_utils/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
#
# from ansible.module_utils.compat.version import LooseVersion

from ._version import LooseVersion
from ._version import LooseVersion # noqa: F401, pylint: disable=unused-import
4 changes: 2 additions & 2 deletions plugins/plugin_utils/action_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@
# 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
felixfontein marked this conversation as resolved.
Show resolved Hide resolved
ArgumentSpecValidator,
ModuleArgumentSpecValidator, # noqa
ModuleArgumentSpecValidator,
)
from ansible.module_utils.errors import UnsupportedError
HAS_ARGSPEC_VALIDATOR = True
Expand Down