From 848340fd6c7fe97f41ea41d3c748c3431f5feee8 Mon Sep 17 00:00:00 2001 From: Ruslan Mstoi Date: Wed, 3 Mar 2021 18:14:57 +0200 Subject: [PATCH] diff_yaml.py: unify function name style (#31201) According to PEP-8 recommended style is snake_case. Hence, update the name of byResourceName function to also use the same style --- bin/diff_yaml.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/diff_yaml.py b/bin/diff_yaml.py index 61cadb573124..4c5182e5e361 100755 --- a/bin/diff_yaml.py +++ b/bin/diff_yaml.py @@ -26,7 +26,7 @@ # returns fully qualified resource name of the k8s resource -def byResourceName(res): +def by_resource_name(res): if res is None: return "" @@ -118,8 +118,8 @@ def compare(args): j0 = normalize(list(yaml.safe_load_all(open(args.orig))), args) j1 = normalize(list(yaml.safe_load_all(open(args.new))), args) - q0 = {byResourceName(res): res for res in j0 if res is not None} - q1 = {byResourceName(res): res for res in j1 if res is not None} + q0 = {by_resource_name(res): res for res in j0 if res is not None} + q1 = {by_resource_name(res): res for res in j1 if res is not None} added, removed, common = keydiff(q0.keys(), q1.keys())