mirror of
https://github.com/Dev-Wiki/git-repo.git
synced 2025-12-14 00:24:05 +08:00
Even more coding style cleanup
Fixing some more pylint warnings: W1401: Anomalous backslash in string W0623: Redefining name 'name' from outer scope W0702: No exception type(s) specified E0102: name: function already defined line n Change-Id: I5afcdb4771ce210390a79981937806e30900a93c
This commit is contained in:
15
project.py
15
project.py
@@ -1012,6 +1012,10 @@ class Project(object):
|
||||
self.CleanPublishedCache(all_refs)
|
||||
revid = self.GetRevisionId(all_refs)
|
||||
|
||||
def _doff():
|
||||
self._FastForward(revid)
|
||||
self._CopyFiles()
|
||||
|
||||
self._InitWorkTree()
|
||||
head = self.work_git.GetHead()
|
||||
if head.startswith(R_HEADS):
|
||||
@@ -1090,9 +1094,6 @@ class Project(object):
|
||||
# All published commits are merged, and thus we are a
|
||||
# strict subset. We can fast-forward safely.
|
||||
#
|
||||
def _doff():
|
||||
self._FastForward(revid)
|
||||
self._CopyFiles()
|
||||
syncbuf.later1(self, _doff)
|
||||
return
|
||||
|
||||
@@ -1155,9 +1156,6 @@ class Project(object):
|
||||
syncbuf.fail(self, e)
|
||||
return
|
||||
else:
|
||||
def _doff():
|
||||
self._FastForward(revid)
|
||||
self._CopyFiles()
|
||||
syncbuf.later1(self, _doff)
|
||||
|
||||
def AddCopyFile(self, src, dest, absdest):
|
||||
@@ -1836,7 +1834,8 @@ class Project(object):
|
||||
if p.Wait() == 0:
|
||||
out = p.stdout
|
||||
if out:
|
||||
return out[:-1].split("\0")
|
||||
return out[:-1].split('\0') # pylint: disable=W1401
|
||||
# Backslash is not anomalous
|
||||
return []
|
||||
|
||||
def DiffZ(self, name, *args):
|
||||
@@ -1852,7 +1851,7 @@ class Project(object):
|
||||
out = p.process.stdout.read()
|
||||
r = {}
|
||||
if out:
|
||||
out = iter(out[:-1].split('\0'))
|
||||
out = iter(out[:-1].split('\0')) # pylint: disable=W1401
|
||||
while out:
|
||||
try:
|
||||
info = out.next()
|
||||
|
||||
Reference in New Issue
Block a user