[meld] dirdiff, tree: PEP8 fixes
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] dirdiff, tree: PEP8 fixes
- Date: Wed, 21 Nov 2018 21:08:24 +0000 (UTC)
commit 815864e889f32c97675de20891e5c01fc1e7d982
Author: Kai Willadsen <kai willadsen gmail com>
Date: Thu Nov 22 06:53:42 2018 +1000
dirdiff, tree: PEP8 fixes
meld/dirdiff.py | 6 ++++--
meld/tree.py | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/meld/dirdiff.py b/meld/dirdiff.py
index 5cebb116..2fffadc7 100644
--- a/meld/dirdiff.py
+++ b/meld/dirdiff.py
@@ -129,7 +129,7 @@ def _contents_same(contents, file_size):
return Different
-def _normalize(contents, ignore_blank_lines, regexes = ()):
+def _normalize(contents, ignore_blank_lines, regexes=()):
contents = (bytes(c) for c in contents)
# For probable text files, discard newline differences to match
if ignore_blank_lines:
@@ -1133,7 +1133,9 @@ class DirDiff(MeldDoc, Component):
# We can skip recalculation if the new cursor is between
# the previous/next bounds, and we weren't on a changed row
state = self.model.get_state(old_cursor, 0)
- if state not in (tree.STATE_NORMAL, tree.STATE_NOCHANGE, tree.STATE_EMPTY):
+ if state not in (
+ tree.STATE_NORMAL, tree.STATE_NOCHANGE,
+ tree.STATE_EMPTY):
skip = False
else:
if self.prev_path is None and self.next_path is None:
diff --git a/meld/tree.py b/meld/tree.py
index 801cd133..3a04115e 100644
--- a/meld/tree.py
+++ b/meld/tree.py
@@ -177,7 +177,8 @@ class DiffTreeStore(SearchableTreeStore):
def _find_next_prev_diff(self, start_path):
def match_func(it):
# TODO: It works, but matching on the first pane only is very poor
- return self.get_state(it, 0) not in (STATE_NORMAL, STATE_NOCHANGE, STATE_EMPTY)
+ return self.get_state(it, 0) not in (
+ STATE_NORMAL, STATE_NOCHANGE, STATE_EMPTY)
return self.get_previous_next_paths(start_path, match_func)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]