mirror of
https://gerrit.googlesource.com/git-repo
synced 2025-01-08 16:14:26 +00:00
pylint fixes for project.py
Fix all the formatting warnings and unused variables Change-Id: I17d88a23572303879530077f3a80451de5417fbb
This commit is contained in:
parent
497bde4de5
commit
7bdac71087
16
project.py
16
project.py
@ -198,13 +198,13 @@ class DiffColoring(Coloring):
|
||||
Coloring.__init__(self, config, 'diff')
|
||||
self.project = self.printer('header', attr='bold')
|
||||
|
||||
class _Annotation:
|
||||
class _Annotation(object):
|
||||
def __init__(self, name, value, keep):
|
||||
self.name = name
|
||||
self.value = value
|
||||
self.keep = keep
|
||||
|
||||
class _CopyFile:
|
||||
class _CopyFile(object):
|
||||
def __init__(self, src, dest, abssrc, absdest):
|
||||
self.src = src
|
||||
self.dest = dest
|
||||
@ -232,7 +232,7 @@ class _CopyFile:
|
||||
except IOError:
|
||||
_error('Cannot copy file %s to %s', src, dest)
|
||||
|
||||
class _LinkFile:
|
||||
class _LinkFile(object):
|
||||
def __init__(self, src, dest, abssrc, absdest):
|
||||
self.src = src
|
||||
self.dest = dest
|
||||
@ -1385,7 +1385,7 @@ class Project(object):
|
||||
return True
|
||||
|
||||
all_refs = self.bare_ref.all
|
||||
if (R_HEADS + name) in all_refs:
|
||||
if R_HEADS + name in all_refs:
|
||||
return GitCommand(self,
|
||||
['checkout', name, '--'],
|
||||
capture_stdout=True,
|
||||
@ -1549,7 +1549,7 @@ class Project(object):
|
||||
|
||||
kept = []
|
||||
for branch in kill:
|
||||
if (R_HEADS + branch) in left:
|
||||
if R_HEADS + branch in left:
|
||||
branch = self.GetBranch(branch)
|
||||
base = branch.LocalMerge
|
||||
if not base:
|
||||
@ -2039,7 +2039,7 @@ class Project(object):
|
||||
if self._allrefs:
|
||||
raise GitError('%s checkout %s ' % (self.name, rev))
|
||||
|
||||
def _CherryPick(self, rev, quiet=False):
|
||||
def _CherryPick(self, rev):
|
||||
cmd = ['cherry-pick']
|
||||
cmd.append(rev)
|
||||
cmd.append('--')
|
||||
@ -2047,7 +2047,7 @@ class Project(object):
|
||||
if self._allrefs:
|
||||
raise GitError('%s cherry-pick %s ' % (self.name, rev))
|
||||
|
||||
def _Revert(self, rev, quiet=False):
|
||||
def _Revert(self, rev):
|
||||
cmd = ['revert']
|
||||
cmd.append('--no-edit')
|
||||
cmd.append(rev)
|
||||
@ -2674,7 +2674,7 @@ class MetaProject(Project):
|
||||
self.revisionExpr = base
|
||||
self.revisionId = None
|
||||
|
||||
def MetaBranchSwitch(self, target):
|
||||
def MetaBranchSwitch(self):
|
||||
""" Prepare MetaProject for manifest branch switch
|
||||
"""
|
||||
|
||||
|
@ -233,7 +233,7 @@ to update the working directory files.
|
||||
sys.exit(1)
|
||||
|
||||
if opt.manifest_branch:
|
||||
m.MetaBranchSwitch(opt.manifest_branch)
|
||||
m.MetaBranchSwitch()
|
||||
|
||||
syncbuf = SyncBuffer(m.config)
|
||||
m.Sync_LocalHalf(syncbuf)
|
||||
|
Loading…
Reference in New Issue
Block a user