summaryrefslogtreecommitdiffstats
path: root/subcmds/branches.py
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@sonymobile.com>2012-09-24 12:15:13 +0900
committerGustaf Lundh <gustaf.lundh@sonymobile.com>2012-10-09 12:45:30 +0200
commit8a68ff96057ec58e524a3e41a2d8dca7b5d016bc (patch)
tree22f6971e8d3c4a90d11d3704602d073a852328b4 /subcmds/branches.py
parente3b1c45aebed329cbc9ad172b1d8e812cf208117 (diff)
downloadgit-repo-8a68ff96057ec58e524a3e41a2d8dca7b5d016bc.tar.gz
Coding style cleanup
Fix the following issues reported by pylint: C0321: More than one statement on a single line W0622: Redefining built-in 'name' W0612: Unused variable 'name' W0613: Unused argument 'name' W0102: Dangerous default value 'value' as argument W0105: String statement has no effect Also fixed a few cases of inconsistent indentation. Change-Id: Ie0db839e7c57d576cff12d8c055fe87030d00744
Diffstat (limited to 'subcmds/branches.py')
-rw-r--r--subcmds/branches.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/subcmds/branches.py b/subcmds/branches.py
index a4f8d360..81aa5b18 100644
--- a/subcmds/branches.py
+++ b/subcmds/branches.py
@@ -140,12 +140,12 @@ is shown, then the branch appears in all projects.
140 fmt = out.write 140 fmt = out.write
141 paths = [] 141 paths = []
142 if in_cnt < project_cnt - in_cnt: 142 if in_cnt < project_cnt - in_cnt:
143 type = 'in' 143 in_type = 'in'
144 for b in i.projects: 144 for b in i.projects:
145 paths.append(b.project.relpath) 145 paths.append(b.project.relpath)
146 else: 146 else:
147 fmt = out.notinproject 147 fmt = out.notinproject
148 type = 'not in' 148 in_type = 'not in'
149 have = set() 149 have = set()
150 for b in i.projects: 150 for b in i.projects:
151 have.add(b.project) 151 have.add(b.project)
@@ -153,11 +153,11 @@ is shown, then the branch appears in all projects.
153 if not p in have: 153 if not p in have:
154 paths.append(p.relpath) 154 paths.append(p.relpath)
155 155
156 s = ' %s %s' % (type, ', '.join(paths)) 156 s = ' %s %s' % (in_type, ', '.join(paths))
157 if width + 7 + len(s) < 80: 157 if width + 7 + len(s) < 80:
158 fmt(s) 158 fmt(s)
159 else: 159 else:
160 fmt(' %s:' % type) 160 fmt(' %s:' % in_type)
161 for p in paths: 161 for p in paths:
162 out.nl() 162 out.nl()
163 fmt(width*' ' + ' %s' % p) 163 fmt(width*' ' + ' %s' % p)