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 /command.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 'command.py')
-rw-r--r-- | command.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -63,7 +63,7 @@ class Command(object): | |||
63 | def GetProjects(self, args, missing_ok=False): | 63 | def GetProjects(self, args, missing_ok=False): |
64 | """A list of projects that match the arguments. | 64 | """A list of projects that match the arguments. |
65 | """ | 65 | """ |
66 | all = self.manifest.projects | 66 | all_projects = self.manifest.projects |
67 | result = [] | 67 | result = [] |
68 | 68 | ||
69 | mp = self.manifest.manifestProject | 69 | mp = self.manifest.manifestProject |
@@ -74,7 +74,7 @@ class Command(object): | |||
74 | groups = [x for x in re.split('[,\s]+', groups) if x] | 74 | groups = [x for x in re.split('[,\s]+', groups) if x] |
75 | 75 | ||
76 | if not args: | 76 | if not args: |
77 | for project in all.values(): | 77 | for project in all_projects.values(): |
78 | if ((missing_ok or project.Exists) and | 78 | if ((missing_ok or project.Exists) and |
79 | project.MatchesGroups(groups)): | 79 | project.MatchesGroups(groups)): |
80 | result.append(project) | 80 | result.append(project) |
@@ -82,14 +82,14 @@ class Command(object): | |||
82 | by_path = None | 82 | by_path = None |
83 | 83 | ||
84 | for arg in args: | 84 | for arg in args: |
85 | project = all.get(arg) | 85 | project = all_projects.get(arg) |
86 | 86 | ||
87 | if not project: | 87 | if not project: |
88 | path = os.path.abspath(arg).replace('\\', '/') | 88 | path = os.path.abspath(arg).replace('\\', '/') |
89 | 89 | ||
90 | if not by_path: | 90 | if not by_path: |
91 | by_path = dict() | 91 | by_path = dict() |
92 | for p in all.values(): | 92 | for p in all_projects.values(): |
93 | by_path[p.worktree] = p | 93 | by_path[p.worktree] = p |
94 | 94 | ||
95 | if os.path.exists(path): | 95 | if os.path.exists(path): |