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
diff --git a/project.py b/project.py
index 2f47169..6e8bb03 100644
--- a/project.py
+++ b/project.py
@@ -1012,6 +1012,10 @@
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 @@
# 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 @@
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 @@
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 @@
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()