summaryrefslogtreecommitdiffstats
path: root/subcmds
diff options
context:
space:
mode:
authorDavid Pursehouse <dpursehouse@collab.net>2017-07-10 22:42:22 +0900
committerDavid Pursehouse <dpursehouse@collab.net>2017-07-10 23:26:04 +0000
commit3bcd30545e58bc5d6932c9390e8909d57a836617 (patch)
tree287bcc992e76ced897981d225e5efe8f399c9693 /subcmds
parent224a31a765eb943443640301a715d2d4eb005b79 (diff)
downloadgit-repo-3bcd30545e58bc5d6932c9390e8909d57a836617.tar.gz
Fix "list comprehension redefines 'x'" warnings from pyflakes
$ git ls-files | grep py$ | xargs pyflakes subcmds/stage.py:101: list comprehension redefines 'p' from line 63 subcmds/sync.py:784: list comprehension redefines 'p' from line 664 subcmds/upload.py:467: list comprehension redefines 'avail' from line 454 Change-Id: Ia65d1a72ed185ab3357e1a91ed4450c719e75a7c
Diffstat (limited to 'subcmds')
-rw-r--r--subcmds/stage.py4
-rw-r--r--subcmds/sync.py4
-rw-r--r--subcmds/upload.py4
3 files changed, 6 insertions, 6 deletions
diff --git a/subcmds/stage.py b/subcmds/stage.py
index 28849764..9d354268 100644
--- a/subcmds/stage.py
+++ b/subcmds/stage.py
@@ -60,8 +60,8 @@ The '%prog' command stages files to prepare the next commit.
60 out.nl() 60 out.nl()
61 61
62 for i in range(len(all_projects)): 62 for i in range(len(all_projects)):
63 p = all_projects[i] 63 project = all_projects[i]
64 out.write('%3d: %s', i + 1, p.relpath + '/') 64 out.write('%3d: %s', i + 1, project.relpath + '/')
65 out.nl() 65 out.nl()
66 out.nl() 66 out.nl()
67 67
diff --git a/subcmds/sync.py b/subcmds/sync.py
index d4432ce8..8a043d9f 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -780,8 +780,8 @@ later is required to fix a server side protocol bug.
780 # generate a new args list to represent the opened projects. 780 # generate a new args list to represent the opened projects.
781 # TODO: make this more reliable -- if there's a project name/path overlap, 781 # TODO: make this more reliable -- if there's a project name/path overlap,
782 # this may choose the wrong project. 782 # this may choose the wrong project.
783 args = [os.path.relpath(self.manifest.paths[p].worktree, os.getcwd()) 783 args = [os.path.relpath(self.manifest.paths[path].worktree, os.getcwd())
784 for p in opened_projects] 784 for path in opened_projects]
785 if not args: 785 if not args:
786 return 786 return
787 all_projects = self.GetProjects(args, 787 all_projects = self.GetProjects(args,
diff --git a/subcmds/upload.py b/subcmds/upload.py
index 38c061df..fa80c3d2 100644
--- a/subcmds/upload.py
+++ b/subcmds/upload.py
@@ -464,8 +464,8 @@ Gerrit Code Review: http://code.google.com/p/gerrit/
464 self.manifest.topdir, 464 self.manifest.topdir,
465 self.manifest.manifestProject.GetRemote('origin').url, 465 self.manifest.manifestProject.GetRemote('origin').url,
466 abort_if_user_denies=True) 466 abort_if_user_denies=True)
467 pending_proj_names = [project.name for (project, avail) in pending] 467 pending_proj_names = [project.name for (project, available) in pending]
468 pending_worktrees = [project.worktree for (project, avail) in pending] 468 pending_worktrees = [project.worktree for (project, available) in pending]
469 try: 469 try:
470 hook.Run(opt.allow_all_hooks, project_list=pending_proj_names, 470 hook.Run(opt.allow_all_hooks, project_list=pending_proj_names,
471 worktree_list=pending_worktrees) 471 worktree_list=pending_worktrees)