library: remove unused module import

Move the import at the top of the file and remove unused module import.

- E402 module level import not at top of file
- F401 'xxxx' imported but unused

This also removes the '# noqa E402' statement from the code.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 2138a00a32)
pull/6789/head
Dimitri Savineau 2020-10-27 12:14:19 -04:00 committed by Guillaume Abrioux
parent 5bf73d4766
commit 1270d5964a
2 changed files with 10 additions and 14 deletions

View File

@ -17,6 +17,15 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type
from ansible.module_utils.basic import AnsibleModule
import datetime
import json
import os
import struct
import time
import base64
import socket
ANSIBLE_METADATA = {
'metadata_version': '1.1',
@ -175,17 +184,6 @@ caps:
RETURN = '''# '''
from ansible.module_utils.basic import AnsibleModule # noqa: E402
import datetime # noqa: E402
import grp # noqa: E402
import json # noqa: E402
import os # noqa: E402
import pwd # noqa: E402
import stat # noqa: E402
import struct # noqa: E402
import time # noqa: E402
import base64 # noqa: E402
import socket # noqa: E402
CEPH_INITIAL_KEYS = ['client.admin', 'client.bootstrap-mds', 'client.bootstrap-mgr', # noqa: E501
'client.bootstrap-osd', 'client.bootstrap-rbd', 'client.bootstrap-rbd-mirror', 'client.bootstrap-rgw'] # noqa: E501

View File

@ -1,5 +1,6 @@
#!/usr/bin/python
from ansible.module_utils.basic import AnsibleModule
import datetime
import copy
import json
@ -179,9 +180,6 @@ EXAMPLES = '''
'''
from ansible.module_utils.basic import AnsibleModule # noqa: E402
def fatal(message, module):
'''
Report a fatal error and exit