Clean up unused imports in plugins (#79899)

pull/79910/head
Matt Clay 2 years ago committed by GitHub
parent 833909ac19
commit 51fadd0aac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,6 @@
minor_changes:
- "Removed unused imports from the following action plugins: async_status, command, pause, set_stats, uri, validate_argument_spec"
- "Removed unused imports from the following lookup plugins: fileglob, template"
- "Removed unused imports from the following strategy plugins: debug"
- "Removed unused imports from the following set of test plugins: files"
- "Removed unused imports from the following vars plugins: host_group_vars"

@ -4,7 +4,6 @@
from __future__ import (absolute_import, division, print_function) from __future__ import (absolute_import, division, print_function)
__metaclass__ = type __metaclass__ = type
from ansible.errors import AnsibleActionFail
from ansible.plugins.action import ActionBase from ansible.plugins.action import ActionBase
from ansible.utils.vars import merge_hash from ansible.utils.vars import merge_hash

@ -4,7 +4,6 @@
from __future__ import (absolute_import, division, print_function) from __future__ import (absolute_import, division, print_function)
__metaclass__ = type __metaclass__ = type
from ansible import constants as C
from ansible.plugins.action import ActionBase from ansible.plugins.action import ActionBase
from ansible.utils.vars import merge_hash from ansible.utils.vars import merge_hash

@ -30,8 +30,7 @@ from os import (
tcgetpgrp, tcgetpgrp,
) )
from ansible.errors import AnsibleError from ansible.errors import AnsibleError
from ansible.module_utils._text import to_text, to_native from ansible.module_utils._text import to_text
from ansible.module_utils.parsing.convert_bool import boolean
from ansible.plugins.action import ActionBase from ansible.plugins.action import ActionBase
from ansible.utils.display import Display from ansible.utils.display import Display

@ -18,7 +18,6 @@
from __future__ import (absolute_import, division, print_function) from __future__ import (absolute_import, division, print_function)
__metaclass__ = type __metaclass__ = type
from ansible.module_utils.six import string_types
from ansible.module_utils.parsing.convert_bool import boolean from ansible.module_utils.parsing.convert_bool import boolean
from ansible.plugins.action import ActionBase from ansible.plugins.action import ActionBase
from ansible.utils.vars import isidentifier from ansible.utils.vars import isidentifier

@ -13,7 +13,6 @@ from ansible.errors import AnsibleError, AnsibleAction, _AnsibleActionDone, Ansi
from ansible.module_utils._text import to_native from ansible.module_utils._text import to_native
from ansible.module_utils.common.collections import Mapping, MutableMapping from ansible.module_utils.common.collections import Mapping, MutableMapping
from ansible.module_utils.parsing.convert_bool import boolean from ansible.module_utils.parsing.convert_bool import boolean
from ansible.module_utils.six import text_type
from ansible.plugins.action import ActionBase from ansible.plugins.action import ActionBase

@ -6,9 +6,7 @@ __metaclass__ = type
from ansible.errors import AnsibleError from ansible.errors import AnsibleError
from ansible.plugins.action import ActionBase from ansible.plugins.action import ActionBase
from ansible.module_utils.six import string_types
from ansible.module_utils.common.arg_spec import ArgumentSpecValidator from ansible.module_utils.common.arg_spec import ArgumentSpecValidator
from ansible.module_utils.errors import AnsibleValidationErrorMultiple
from ansible.utils.vars import combine_vars from ansible.utils.vars import combine_vars

@ -18,4 +18,4 @@ from __future__ import (absolute_import, division, print_function)
__metaclass__ = type __metaclass__ = type
# moved actual classes to __init__ kept here for backward compat with 3rd parties # moved actual classes to __init__ kept here for backward compat with 3rd parties
from ansible.plugins.cache import BaseCacheModule, BaseFileCacheModule from ansible.plugins.cache import BaseCacheModule, BaseFileCacheModule # pylint: disable=unused-import

@ -176,7 +176,7 @@ from urllib.parse import urlunsplit
HAVE_KERBEROS = False HAVE_KERBEROS = False
try: try:
import kerberos import kerberos # pylint: disable=unused-import
HAVE_KERBEROS = True HAVE_KERBEROS = True
except ImportError: except ImportError:
pass pass

@ -50,7 +50,6 @@ import os
import glob import glob
from ansible.plugins.lookup import LookupBase from ansible.plugins.lookup import LookupBase
from ansible.errors import AnsibleFileNotFound
from ansible.module_utils._text import to_bytes, to_text from ansible.module_utils._text import to_bytes, to_text

@ -84,7 +84,7 @@ import ansible.constants as C
from ansible.errors import AnsibleError from ansible.errors import AnsibleError
from ansible.plugins.lookup import LookupBase from ansible.plugins.lookup import LookupBase
from ansible.module_utils._text import to_bytes, to_text from ansible.module_utils._text import to_text
from ansible.template import generate_ansible_template_vars, AnsibleEnvironment from ansible.template import generate_ansible_template_vars, AnsibleEnvironment
from ansible.utils.display import Display from ansible.utils.display import Display
from ansible.utils.native_jinja import NativeJinjaText from ansible.utils.native_jinja import NativeJinjaText

@ -24,10 +24,6 @@ DOCUMENTATION = '''
author: Kishin Yagami (!UNKNOWN) author: Kishin Yagami (!UNKNOWN)
''' '''
import cmd
import pprint
import sys
from ansible.plugins.strategy.linear import StrategyModule as LinearStrategyModule from ansible.plugins.strategy.linear import StrategyModule as LinearStrategyModule

@ -20,7 +20,6 @@ from __future__ import (absolute_import, division, print_function)
__metaclass__ = type __metaclass__ = type
from os.path import isdir, isfile, isabs, exists, lexists, islink, samefile, ismount from os.path import isdir, isfile, isabs, exists, lexists, islink, samefile, ismount
from ansible import errors
class TestModule(object): class TestModule(object):

@ -54,7 +54,6 @@ DOCUMENTATION = '''
''' '''
import os import os
from ansible import constants as C
from ansible.errors import AnsibleParserError from ansible.errors import AnsibleParserError
from ansible.module_utils._text import to_bytes, to_native, to_text from ansible.module_utils._text import to_bytes, to_native, to_text
from ansible.plugins.vars import BaseVarsPlugin from ansible.plugins.vars import BaseVarsPlugin

Loading…
Cancel
Save