Imported Upstream version 1.36.0
[platform/upstream/grpc.git] / tools / buildgen / build_cleaner.py
index b044cb7..19bcee6 100755 (executable)
@@ -48,15 +48,18 @@ def _rebuild_as_ordered_dict(indict, special_keys):
         if key in indict:
             outdict[key] = indict[key]
     for key in sorted(indict.keys()):
-        if key in special_keys: continue
-        if '#' in key: continue
+        if key in special_keys:
+            continue
+        if '#' in key:
+            continue
         outdict[key] = indict[key]
     return outdict
 
 
 def _clean_elem(indict):
     for name in ['public_headers', 'headers', 'src']:
-        if name not in indict: continue
+        if name not in indict:
+            continue
         inlist = indict[name]
         protos = list(x for x in inlist if os.path.splitext(x)[1] == '.proto')
         others = set(x for x in inlist if x not in protos)
@@ -68,7 +71,8 @@ def cleaned_build_yaml_dict_as_string(indict):
     """Takes dictionary which represents yaml file and returns the cleaned-up yaml string"""
     js = _rebuild_as_ordered_dict(indict, _TOP_LEVEL_KEYS)
     for grp in ['filegroups', 'libs', 'targets']:
-        if grp not in js: continue
+        if grp not in js:
+            continue
         js[grp] = sorted([_clean_elem(x) for x in js[grp]],
                          key=lambda x: (x.get('language', '_'), x['name']))
     output = yaml.dump(js, indent=2, width=80, default_flow_style=False)