[meld] dirdiff: Remove some lambda assignments
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] dirdiff: Remove some lambda assignments
- Date: Sun, 31 Dec 2017 20:14:35 +0000 (UTC)
commit 944079bc320b04071cf106ecceed77c461c86338
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun Dec 17 09:22:24 2017 +1000
dirdiff: Remove some lambda assignments
meld/dirdiff.py | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/meld/dirdiff.py b/meld/dirdiff.py
index dc35ef79..b9a2848d 100644
--- a/meld/dirdiff.py
+++ b/meld/dirdiff.py
@@ -1185,8 +1185,10 @@ class DirDiff(melddoc.MeldDoc, gnomeglade.Component):
pane = self._get_focused_pane()
if pane is None:
return
- path = lambda p: self.model.value_path(self.model.get_iter(p), pane)
- files = [path(p) for p in self._get_selected_paths(pane)]
+ files = [
+ self.model.value_path(self.model.get_iter(p), pane)
+ for p in self._get_selected_paths(pane)
+ ]
files = [f for f in files if f]
if files:
self._open_files(files)
@@ -1195,9 +1197,10 @@ class DirDiff(melddoc.MeldDoc, gnomeglade.Component):
self.refresh()
def on_filter_state_toggled(self, button):
- active_action = lambda a: self.actiongroup.get_action(a).get_active()
- active_filters = [a for a in self.state_actions if
- active_action(self.state_actions[a][1])]
+ active_filters = [
+ a for a in self.state_actions if
+ self.actiongroup.get_action(self.state_actions[a][1]).get_active()
+ ]
if set(active_filters) == set(self.state_filters):
return
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]