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
This commit is contained in:
parent
e3b1c45aeb
commit
8a68ff9605
22 changed files with 167 additions and 172 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue