mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-08 05:52:37 +00:00
F401: Remove unused imports
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user