From 8a68ff96057ec58e524a3e41a2d8dca7b5d016bc Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Mon, 24 Sep 2012 12:15:13 +0900 Subject: 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 --- command.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'command.py') diff --git a/command.py b/command.py index 5789582c..e17f0ab9 100644 --- a/command.py +++ b/command.py @@ -63,7 +63,7 @@ class Command(object): def GetProjects(self, args, missing_ok=False): """A list of projects that match the arguments. """ - all = self.manifest.projects + all_projects = self.manifest.projects result = [] mp = self.manifest.manifestProject @@ -74,7 +74,7 @@ class Command(object): groups = [x for x in re.split('[,\s]+', groups) if x] if not args: - for project in all.values(): + for project in all_projects.values(): if ((missing_ok or project.Exists) and project.MatchesGroups(groups)): result.append(project) @@ -82,14 +82,14 @@ class Command(object): by_path = None for arg in args: - project = all.get(arg) + project = all_projects.get(arg) if not project: path = os.path.abspath(arg).replace('\\', '/') if not by_path: by_path = dict() - for p in all.values(): + for p in all_projects.values(): by_path[p.worktree] = p if os.path.exists(path): -- cgit v1.2.3-54-g00ecf