[meld: 4/6] Fix flake8
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld: 4/6] Fix flake8
- Date: Fri, 1 Jan 2021 21:40:38 +0000 (UTC)
commit 8aab164183e30f8d16dbc8f66bbe36564a0f5579
Author: Jack <jack vanier16 outlook com>
Date: Tue Dec 22 21:42:46 2020 -0500
Fix flake8
meld/dirdiff.py | 9 ++++-----
meld/filediff.py | 2 +-
2 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/meld/dirdiff.py b/meld/dirdiff.py
index 517ba680..f92fcd75 100644
--- a/meld/dirdiff.py
+++ b/meld/dirdiff.py
@@ -918,13 +918,12 @@ class DirDiff(Gtk.VBox, tree.TreeviewCommon, MeldDoc):
if differences:
expanded.add(tree_path_as_tuple(path))
- duplicate_directories = list(set([p for p in roots
- if roots.count(p) > 1]))
+ duplicate_dirs = list(set([p for p in roots if roots.count(p) > 1]))
if invalid_filenames or shadowed_entries:
self._show_tree_wide_errors(invalid_filenames, shadowed_entries)
- elif duplicate_directories:
+ elif duplicate_dirs:
# Since we can only load 3 dirs we can have at most 1 duplicate
- self._show_duplicate_directory(duplicate_directories[0])
+ self._show_duplicate_directory(duplicate_dirs[0])
elif rootpath == Gtk.TreePath.new_first() and not expanded:
self._show_identical_status()
@@ -941,7 +940,7 @@ class DirDiff(Gtk.VBox, tree.TreeviewCommon, MeldDoc):
for index in range(self.num_panes):
primary = _(
"Folder %s was loaded more than once" % duplicate_directory)
- msgarea = self.msgarea_mgr[index].add_dismissable_msg(
+ self.msgarea_mgr[index].add_dismissable_msg(
'dialog-error-symbolic', primary, "",
self.msgarea_mgr[:index]+self.msgarea_mgr[index+1:])
diff --git a/meld/filediff.py b/meld/filediff.py
index 5adc4057..ba9ea502 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -1810,7 +1810,7 @@ class FileDiff(Gtk.VBox, MeldDoc):
self._set_merge_action_sensitivity()
paths = [tb.data.gfile.get_path() for tb in self.textbuffer
- if tb.data.gfile]
+ if tb.data.gfile]
duplicate_files = list(set([p for p in paths if paths.count(p) > 1]))
if duplicate_files:
for index in range(self.num_panes):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]