mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-07 05:22:39 +00:00
Upgrade black version (#424)
Upgrade black version SUMMARY Move off of beta version of black and pin to current calendar year version. The only manual changes here are to tox.ini. Everything else is from running the new version of black. ISSUE TYPE COMPONENT NAME ADDITIONAL INFORMATION Reviewed-by: Abhijeet Kasurde <None>
This commit is contained in:
@@ -96,7 +96,7 @@ class Discoverer(kubernetes.dynamic.discovery.Discoverer):
|
||||
self._write_cache()
|
||||
|
||||
def get_resources_for_api_version(self, prefix, group, version, preferred):
|
||||
""" returns a dictionary of resources associated with provided (prefix, group, version)"""
|
||||
"""returns a dictionary of resources associated with provided (prefix, group, version)"""
|
||||
|
||||
resources = defaultdict(list)
|
||||
subresources = defaultdict(dict)
|
||||
|
||||
@@ -473,9 +473,11 @@ class K8sAnsibleMixin(object):
|
||||
if result_empty(result):
|
||||
res = dict(resources=[], api_found=True)
|
||||
if last_exception is not None:
|
||||
res["msg"] = (
|
||||
"Exception '%s' raised while trying to get resource using %s"
|
||||
% (last_exception, params)
|
||||
res[
|
||||
"msg"
|
||||
] = "Exception '%s' raised while trying to get resource using %s" % (
|
||||
last_exception,
|
||||
params,
|
||||
)
|
||||
return res
|
||||
|
||||
|
||||
@@ -385,8 +385,10 @@ def check_pod(k8s_ansible_mixin, module):
|
||||
def _fail(exc):
|
||||
arg = {}
|
||||
if hasattr(exc, "body"):
|
||||
msg = "Namespace={0} Kind=Pod Name={1}: Failed requested object: {2}".format(
|
||||
namespace, name, exc.body
|
||||
msg = (
|
||||
"Namespace={0} Kind=Pod Name={1}: Failed requested object: {2}".format(
|
||||
namespace, name, exc.body
|
||||
)
|
||||
)
|
||||
else:
|
||||
msg = to_native(exc)
|
||||
|
||||
@@ -19,4 +19,4 @@ __metaclass__ = type
|
||||
|
||||
|
||||
class ApplyException(Exception):
|
||||
""" Could not apply patch """
|
||||
"""Could not apply patch"""
|
||||
|
||||
Reference in New Issue
Block a user