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/upload.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'subcmds/upload.py') diff --git a/subcmds/upload.py b/subcmds/upload.py index c9312973..685e3420 100644 --- a/subcmds/upload.py +++ b/subcmds/upload.py @@ -40,8 +40,8 @@ def _die(fmt, *args): def _SplitEmails(values): result = [] - for str in values: - result.extend([s.strip() for s in str.split(',')]) + for value in values: + result.extend([s.strip() for s in value.split(',')]) return result class Upload(InteractiveCommand): @@ -174,15 +174,15 @@ Gerrit Code Review: http://code.google.com/p/gerrit/ if answer is None: date = branch.date - list = branch.commits + commit_list = branch.commits print 'Upload project %s/ to remote branch %s:' % (project.relpath, project.revisionExpr) print ' branch %s (%2d commit%s, %s):' % ( name, - len(list), - len(list) != 1 and 's' or '', + len(commit_list), + len(commit_list) != 1 and 's' or '', date) - for commit in list: + for commit in commit_list: print ' %s' % commit sys.stdout.write('to %s (y/N)? ' % remote.review) @@ -212,17 +212,17 @@ Gerrit Code Review: http://code.google.com/p/gerrit/ for branch in avail: name = branch.name date = branch.date - list = branch.commits + commit_list = branch.commits if b: script.append('#') script.append('# branch %s (%2d commit%s, %s) to remote branch %s:' % ( name, - len(list), - len(list) != 1 and 's' or '', + len(commit_list), + len(commit_list) != 1 and 's' or '', date, project.revisionExpr)) - for commit in list: + for commit in commit_list: script.append('# %s' % commit) b[name] = branch -- cgit v1.2.3-54-g00ecf