mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +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')
|
Coloring.__init__(self, config, 'diff')
|
||||||
self.project = self.printer('header', attr='bold')
|
self.project = self.printer('header', attr='bold')
|
||||||
|
|
||||||
class _Annotation:
|
class _Annotation(object):
|
||||||
def __init__(self, name, value, keep):
|
def __init__(self, name, value, keep):
|
||||||
self.name = name
|
self.name = name
|
||||||
self.value = value
|
self.value = value
|
||||||
self.keep = keep
|
self.keep = keep
|
||||||
|
|
||||||
class _CopyFile:
|
class _CopyFile(object):
|
||||||
def __init__(self, src, dest, abssrc, absdest):
|
def __init__(self, src, dest, abssrc, absdest):
|
||||||
self.src = src
|
self.src = src
|
||||||
self.dest = dest
|
self.dest = dest
|
||||||
@ -232,7 +232,7 @@ class _CopyFile:
|
|||||||
except IOError:
|
except IOError:
|
||||||
_error('Cannot copy file %s to %s', src, dest)
|
_error('Cannot copy file %s to %s', src, dest)
|
||||||
|
|
||||||
class _LinkFile:
|
class _LinkFile(object):
|
||||||
def __init__(self, src, dest, abssrc, absdest):
|
def __init__(self, src, dest, abssrc, absdest):
|
||||||
self.src = src
|
self.src = src
|
||||||
self.dest = dest
|
self.dest = dest
|
||||||
@ -1385,7 +1385,7 @@ class Project(object):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
all_refs = self.bare_ref.all
|
all_refs = self.bare_ref.all
|
||||||
if (R_HEADS + name) in all_refs:
|
if R_HEADS + name in all_refs:
|
||||||
return GitCommand(self,
|
return GitCommand(self,
|
||||||
['checkout', name, '--'],
|
['checkout', name, '--'],
|
||||||
capture_stdout=True,
|
capture_stdout=True,
|
||||||
@ -1549,7 +1549,7 @@ class Project(object):
|
|||||||
|
|
||||||
kept = []
|
kept = []
|
||||||
for branch in kill:
|
for branch in kill:
|
||||||
if (R_HEADS + branch) in left:
|
if R_HEADS + branch in left:
|
||||||
branch = self.GetBranch(branch)
|
branch = self.GetBranch(branch)
|
||||||
base = branch.LocalMerge
|
base = branch.LocalMerge
|
||||||
if not base:
|
if not base:
|
||||||
@ -2039,7 +2039,7 @@ class Project(object):
|
|||||||
if self._allrefs:
|
if self._allrefs:
|
||||||
raise GitError('%s checkout %s ' % (self.name, rev))
|
raise GitError('%s checkout %s ' % (self.name, rev))
|
||||||
|
|
||||||
def _CherryPick(self, rev, quiet=False):
|
def _CherryPick(self, rev):
|
||||||
cmd = ['cherry-pick']
|
cmd = ['cherry-pick']
|
||||||
cmd.append(rev)
|
cmd.append(rev)
|
||||||
cmd.append('--')
|
cmd.append('--')
|
||||||
@ -2047,7 +2047,7 @@ class Project(object):
|
|||||||
if self._allrefs:
|
if self._allrefs:
|
||||||
raise GitError('%s cherry-pick %s ' % (self.name, rev))
|
raise GitError('%s cherry-pick %s ' % (self.name, rev))
|
||||||
|
|
||||||
def _Revert(self, rev, quiet=False):
|
def _Revert(self, rev):
|
||||||
cmd = ['revert']
|
cmd = ['revert']
|
||||||
cmd.append('--no-edit')
|
cmd.append('--no-edit')
|
||||||
cmd.append(rev)
|
cmd.append(rev)
|
||||||
@ -2674,7 +2674,7 @@ class MetaProject(Project):
|
|||||||
self.revisionExpr = base
|
self.revisionExpr = base
|
||||||
self.revisionId = None
|
self.revisionId = None
|
||||||
|
|
||||||
def MetaBranchSwitch(self, target):
|
def MetaBranchSwitch(self):
|
||||||
""" Prepare MetaProject for manifest branch switch
|
""" Prepare MetaProject for manifest branch switch
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -233,7 +233,7 @@ to update the working directory files.
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
if opt.manifest_branch:
|
if opt.manifest_branch:
|
||||||
m.MetaBranchSwitch(opt.manifest_branch)
|
m.MetaBranchSwitch()
|
||||||
|
|
||||||
syncbuf = SyncBuffer(m.config)
|
syncbuf = SyncBuffer(m.config)
|
||||||
m.Sync_LocalHalf(syncbuf)
|
m.Sync_LocalHalf(syncbuf)
|
||||||
|
Loading…
Reference in New Issue
Block a user