More coding style cleanup
Fixing more issues found with pylint. Some that were supposed to
have been fixed in the previous sweep (Ie0db839e) but were missed:
C0321: More than one statement on a single line
W0622: Redefining built-in 'name'
And some more:
W0631: Using possibly undefined loop variable 'name'
W0223: Method 'name' is abstract in class 'name' but is not overridden
W0231: __init__ method from base class 'name' is not called
Change-Id: Ie119183708609d6279e973057a385fde864230c3
diff --git a/subcmds/branches.py b/subcmds/branches.py
index 81aa5b1..a7ba3d6 100644
--- a/subcmds/branches.py
+++ b/subcmds/branches.py
@@ -93,17 +93,17 @@
def Execute(self, opt, args):
projects = self.GetProjects(args)
out = BranchColoring(self.manifest.manifestProject.config)
- all = {}
+ all_branches = {}
project_cnt = len(projects)
for project in projects:
for name, b in project.GetBranches().iteritems():
b.project = project
- if name not in all:
- all[name] = BranchInfo(name)
- all[name].add(b)
+ if name not in all_branches:
+ all_branches[name] = BranchInfo(name)
+ all_branches[name].add(b)
- names = all.keys()
+ names = all_branches.keys()
names.sort()
if not names:
@@ -116,7 +116,7 @@
width = len(name)
for name in names:
- i = all[name]
+ i = all_branches[name]
in_cnt = len(i.projects)
if i.IsCurrent: