summaryrefslogtreecommitdiffstats
path: root/subcmds/prune.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/prune.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/prune.py')
-rw-r--r--subcmds/prune.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/subcmds/prune.py b/subcmds/prune.py
index f412bd48..c50a5507 100644
--- a/subcmds/prune.py
+++ b/subcmds/prune.py
@@ -24,11 +24,11 @@ class Prune(PagedCommand):
24""" 24"""
25 25
26 def Execute(self, opt, args): 26 def Execute(self, opt, args):
27 all = [] 27 all_branches = []
28 for project in self.GetProjects(args): 28 for project in self.GetProjects(args):
29 all.extend(project.PruneHeads()) 29 all_branches.extend(project.PruneHeads())
30 30
31 if not all: 31 if not all_branches:
32 return 32 return
33 33
34 class Report(Coloring): 34 class Report(Coloring):
@@ -36,13 +36,13 @@ class Prune(PagedCommand):
36 Coloring.__init__(self, config, 'status') 36 Coloring.__init__(self, config, 'status')
37 self.project = self.printer('header', attr='bold') 37 self.project = self.printer('header', attr='bold')
38 38
39 out = Report(all[0].project.config) 39 out = Report(all_branches[0].project.config)
40 out.project('Pending Branches') 40 out.project('Pending Branches')
41 out.nl() 41 out.nl()
42 42
43 project = None 43 project = None
44 44
45 for branch in all: 45 for branch in all_branches:
46 if project != branch.project: 46 if project != branch.project:
47 project = branch.project 47 project = branch.project
48 out.nl() 48 out.nl()