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/upload.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/upload.py')
| -rw-r--r-- | subcmds/upload.py | 20 |
1 files changed, 10 insertions, 10 deletions
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): | |||
| 40 | 40 | ||
| 41 | def _SplitEmails(values): | 41 | def _SplitEmails(values): |
| 42 | result = [] | 42 | result = [] |
| 43 | for str in values: | 43 | for value in values: |
| 44 | result.extend([s.strip() for s in str.split(',')]) | 44 | result.extend([s.strip() for s in value.split(',')]) |
| 45 | return result | 45 | return result |
| 46 | 46 | ||
| 47 | class Upload(InteractiveCommand): | 47 | class Upload(InteractiveCommand): |
| @@ -174,15 +174,15 @@ Gerrit Code Review: http://code.google.com/p/gerrit/ | |||
| 174 | 174 | ||
| 175 | if answer is None: | 175 | if answer is None: |
| 176 | date = branch.date | 176 | date = branch.date |
| 177 | list = branch.commits | 177 | commit_list = branch.commits |
| 178 | 178 | ||
| 179 | print 'Upload project %s/ to remote branch %s:' % (project.relpath, project.revisionExpr) | 179 | print 'Upload project %s/ to remote branch %s:' % (project.relpath, project.revisionExpr) |
| 180 | print ' branch %s (%2d commit%s, %s):' % ( | 180 | print ' branch %s (%2d commit%s, %s):' % ( |
| 181 | name, | 181 | name, |
| 182 | len(list), | 182 | len(commit_list), |
| 183 | len(list) != 1 and 's' or '', | 183 | len(commit_list) != 1 and 's' or '', |
| 184 | date) | 184 | date) |
| 185 | for commit in list: | 185 | for commit in commit_list: |
| 186 | print ' %s' % commit | 186 | print ' %s' % commit |
| 187 | 187 | ||
| 188 | sys.stdout.write('to %s (y/N)? ' % remote.review) | 188 | sys.stdout.write('to %s (y/N)? ' % remote.review) |
| @@ -212,17 +212,17 @@ Gerrit Code Review: http://code.google.com/p/gerrit/ | |||
| 212 | for branch in avail: | 212 | for branch in avail: |
| 213 | name = branch.name | 213 | name = branch.name |
| 214 | date = branch.date | 214 | date = branch.date |
| 215 | list = branch.commits | 215 | commit_list = branch.commits |
| 216 | 216 | ||
| 217 | if b: | 217 | if b: |
| 218 | script.append('#') | 218 | script.append('#') |
| 219 | script.append('# branch %s (%2d commit%s, %s) to remote branch %s:' % ( | 219 | script.append('# branch %s (%2d commit%s, %s) to remote branch %s:' % ( |
| 220 | name, | 220 | name, |
| 221 | len(list), | 221 | len(commit_list), |
| 222 | len(list) != 1 and 's' or '', | 222 | len(commit_list) != 1 and 's' or '', |
| 223 | date, | 223 | date, |
| 224 | project.revisionExpr)) | 224 | project.revisionExpr)) |
| 225 | for commit in list: | 225 | for commit in commit_list: |
| 226 | script.append('# %s' % commit) | 226 | script.append('# %s' % commit) |
| 227 | b[name] = branch | 227 | b[name] = branch |
| 228 | 228 | ||
