diff options
author | David Pursehouse <david.pursehouse@sonymobile.com> | 2012-09-24 12:15:13 +0900 |
---|---|---|
committer | Gustaf Lundh <gustaf.lundh@sonymobile.com> | 2012-10-09 12:45:30 +0200 |
commit | 8a68ff96057ec58e524a3e41a2d8dca7b5d016bc (patch) | |
tree | 22f6971e8d3c4a90d11d3704602d073a852328b4 /subcmds/overview.py | |
parent | e3b1c45aebed329cbc9ad172b1d8e812cf208117 (diff) | |
download | git-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/overview.py')
-rw-r--r-- | subcmds/overview.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/subcmds/overview.py b/subcmds/overview.py index 96fa93d8..a509bd9a 100644 --- a/subcmds/overview.py +++ b/subcmds/overview.py | |||
@@ -38,16 +38,16 @@ are displayed. | |||
38 | help="Consider only checked out branches") | 38 | help="Consider only checked out branches") |
39 | 39 | ||
40 | def Execute(self, opt, args): | 40 | def Execute(self, opt, args): |
41 | all = [] | 41 | all_branches = [] |
42 | for project in self.GetProjects(args): | 42 | for project in self.GetProjects(args): |
43 | br = [project.GetUploadableBranch(x) | 43 | br = [project.GetUploadableBranch(x) |
44 | for x in project.GetBranches().keys()] | 44 | for x in project.GetBranches().keys()] |
45 | br = [x for x in br if x] | 45 | br = [x for x in br if x] |
46 | if opt.current_branch: | 46 | if opt.current_branch: |
47 | br = [x for x in br if x.name == project.CurrentBranch] | 47 | br = [x for x in br if x.name == project.CurrentBranch] |
48 | all.extend(br) | 48 | all_branches.extend(br) |
49 | 49 | ||
50 | if not all: | 50 | if not all_branches: |
51 | return | 51 | return |
52 | 52 | ||
53 | class Report(Coloring): | 53 | class Report(Coloring): |
@@ -55,13 +55,13 @@ are displayed. | |||
55 | Coloring.__init__(self, config, 'status') | 55 | Coloring.__init__(self, config, 'status') |
56 | self.project = self.printer('header', attr='bold') | 56 | self.project = self.printer('header', attr='bold') |
57 | 57 | ||
58 | out = Report(all[0].project.config) | 58 | out = Report(all_branches[0].project.config) |
59 | out.project('Projects Overview') | 59 | out.project('Projects Overview') |
60 | out.nl() | 60 | out.nl() |
61 | 61 | ||
62 | project = None | 62 | project = None |
63 | 63 | ||
64 | for branch in all: | 64 | for branch in all_branches: |
65 | if project != branch.project: | 65 | if project != branch.project: |
66 | project = branch.project | 66 | project = branch.project |
67 | out.nl() | 67 | out.nl() |