[meld] PEP8 fixes
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] PEP8 fixes
- Date: Wed, 3 Apr 2013 20:50:47 +0000 (UTC)
commit 920e59ffec23decbd3bd06f45469123e771184cb
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun Mar 24 11:40:15 2013 +1000
PEP8 fixes
meld/matchers.py | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/meld/matchers.py b/meld/matchers.py
index cf103b7..23e2944 100644
--- a/meld/matchers.py
+++ b/meld/matchers.py
@@ -359,14 +359,15 @@ class InlineMyersSequenceMatcher(MyersSequenceMatcher):
a = indexed_a
b = indexed_b
return (a, b)
-
+
+
class SyncPointMyersSequenceMatcher(MyersSequenceMatcher):
def __init__(self, isjunk=None, a="", b="", syncpoints=None):
MyersSequenceMatcher.__init__(self, isjunk, a, b)
self.isjunk = isjunk
self.syncpoints = syncpoints
-
+
def initialise(self):
if self.syncpoints is None or len(self.syncpoints) == 0:
for i in MyersSequenceMatcher.initialise(self):
@@ -380,7 +381,9 @@ class SyncPointMyersSequenceMatcher(MyersSequenceMatcher):
ai = aj
bi = bj
if ai < len(self.a) or bi < len(self.b):
- chunks.append((ai, bi, self.a[ai:len(self.a)], self.b[bi:len(self.b)]))
+ chunks.append((ai, bi,
+ self.a[ai:len(self.a)],
+ self.b[bi:len(self.b)]))
self.matching_blocks = []
for ai, bi, a, b in chunks:
matcher = MyersSequenceMatcher(self.isjunk, a, b)
@@ -389,13 +392,13 @@ class SyncPointMyersSequenceMatcher(MyersSequenceMatcher):
blocks = matcher.get_matching_blocks()
l = len(self.matching_blocks) - 1
if l >= 0 and len(blocks) > 1:
- aj = self.matching_blocks[l][0]
+ aj = self.matching_blocks[l][0]
bj = self.matching_blocks[l][1]
bl = self.matching_blocks[l][2]
- if aj + bl == ai and bj + bl == bi and blocks[0][0] == 0 and blocks[0][1] == 0:
+ if (aj + bl == ai and bj + bl == bi and
+ blocks[0][0] == 0 and blocks[0][1] == 0):
block = blocks.pop(0)
self.matching_blocks[l] = (aj, bj, bl + block[2])
for x, y, l in blocks[:-1]:
self.matching_blocks.append((ai + x, bi + y, l))
self.matching_blocks.append((len(self.a), len(self.b), 0))
-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]