mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-28 15:41:22 -07:00
[stable-5] Remove unneccessary imports (#5977)
* Remove unneccessary imports (#5940)
* Remove unneccessary imports.
* Keep unnecessary imports in module_utils - for now.
* Make older sanity tests shut up.
* Also make flake8 happier.
(cherry picked from commit 2b8ac3c629
)
* Re-add os import.
This commit is contained in:
parent
6932a937c5
commit
24210b32cf
46 changed files with 65 additions and 87 deletions
|
@ -105,7 +105,6 @@ RETURN = """
|
|||
type: dict
|
||||
"""
|
||||
|
||||
import os
|
||||
from ansible.module_utils.six.moves.urllib.parse import urlparse
|
||||
from ansible.errors import AnsibleError, AnsibleAssertionError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
|
|
|
@ -80,7 +80,6 @@ from subprocess import Popen
|
|||
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.parsing.splitter import parse_kv
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_text, to_native
|
||||
from ansible.utils.display import Display
|
||||
|
||||
|
|
|
@ -136,12 +136,11 @@ RETURN = '''
|
|||
|
||||
import re
|
||||
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.utils.display import Display
|
||||
from ansible.errors import AnsibleLookupError
|
||||
from ansible.module_utils.basic import missing_required_lib
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.errors import AnsibleError, AnsibleLookupError
|
||||
from ansible.utils.display import Display
|
||||
|
||||
try:
|
||||
import etcd3
|
||||
|
|
|
@ -68,8 +68,8 @@ from ansible.module_utils import six
|
|||
from ansible.utils.display import Display
|
||||
from traceback import format_exception
|
||||
import json
|
||||
import sys
|
||||
import os
|
||||
import sys
|
||||
|
||||
display = Display()
|
||||
|
||||
|
|
|
@ -73,8 +73,6 @@ _raw:
|
|||
elements: str
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
HAVE_REDIS = False
|
||||
try:
|
||||
import redis
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue