F401: Remove unused imports

This commit is contained in:
Will Thames
2020-06-09 18:53:36 +10:00
parent 1fb38fa982
commit 59348066a0
4 changed files with 1 additions and 19 deletions

View File

@@ -202,7 +202,6 @@ from ansible_collections.community.kubernetes.plugins.module_utils.common import
try:
from openshift.dynamic import DynamicClient
from openshift.dynamic.exceptions import NotFoundError
HAS_K8S_MODULE_HELPER = True
k8s_import_exception = None
@@ -210,12 +209,6 @@ except ImportError as e:
HAS_K8S_MODULE_HELPER = False
k8s_import_exception = e
try:
import yaml
HAS_YAML = True
except ImportError:
HAS_YAML = False
class KubernetesLookup(K8sAnsibleMixin):
@@ -226,11 +219,6 @@ class KubernetesLookup(K8sAnsibleMixin):
"Requires the OpenShift Python client. Try `pip install openshift`. Detail: {0}".format(k8s_import_exception)
)
if not HAS_YAML:
raise Exception(
"Requires PyYAML. Try `pip install PyYAML`"
)
self.kind = None
self.name = None
self.namespace = None