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 --- subcmds/stage.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'subcmds/stage.py') diff --git a/subcmds/stage.py b/subcmds/stage.py index 4c221dba..2ec48069 100644 --- a/subcmds/stage.py +++ b/subcmds/stage.py @@ -48,8 +48,8 @@ The '%prog' command stages files to prepare the next commit. self.Usage() def _Interactive(self, opt, args): - all = filter(lambda x: x.IsDirty(), self.GetProjects(args)) - if not all: + all_projects = filter(lambda x: x.IsDirty(), self.GetProjects(args)) + if not all_projects: print >>sys.stderr,'no projects have uncommitted modifications' return @@ -58,8 +58,8 @@ The '%prog' command stages files to prepare the next commit. out.header(' %s', 'project') out.nl() - for i in xrange(0, len(all)): - p = all[i] + for i in xrange(0, len(all_projects)): + p = all_projects[i] out.write('%3d: %s', i + 1, p.relpath + '/') out.nl() out.nl() @@ -93,11 +93,11 @@ The '%prog' command stages files to prepare the next commit. if a_index is not None: if a_index == 0: break - if 0 < a_index and a_index <= len(all): - _AddI(all[a_index - 1]) + if 0 < a_index and a_index <= len(all_projects): + _AddI(all_projects[a_index - 1]) continue - p = filter(lambda x: x.name == a or x.relpath == a, all) + p = filter(lambda x: x.name == a or x.relpath == a, all_projects) if len(p) == 1: _AddI(p[0]) continue -- cgit v1.2.3-54-g00ecf