summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-05-24 13:55:14 +0200
committerAnton Khirnov <anton@khirnov.net>2020-05-24 13:55:32 +0200
commitb1f6be9d1808406c94c5c033b50abb5f7517e82b (patch)
tree76ada4ba4cc94d929047cc02e2b6f5cfe420c93d /alot
parent2b1f282a30a0a3f5888a88457ab0b1c7e8e5b1a7 (diff)
taglist: drop the useless filtfun parameter
Diffstat (limited to 'alot')
-rw-r--r--alot/buffers/taglist.py5
-rw-r--r--alot/commands/globals.py9
2 files changed, 4 insertions, 10 deletions
diff --git a/alot/buffers/taglist.py b/alot/buffers/taglist.py
index d97876df..bb344c45 100644
--- a/alot/buffers/taglist.py
+++ b/alot/buffers/taglist.py
@@ -13,8 +13,7 @@ class TagListBuffer(Buffer):
modename = 'taglist'
- def __init__(self, alltags=None, filtfun=lambda x: x):
- self.filtfun = filtfun
+ def __init__(self, alltags=None):
self.tags = alltags or []
self.isinitialized = False
self.rebuild()
@@ -29,7 +28,7 @@ class TagListBuffer(Buffer):
self.isinitialized = True
lines = list()
- displayedtags = sorted((t for t in self.tags if self.filtfun(t)),
+ displayedtags = sorted((t for t in self.tags if t),
key=str.lower)
for (num, b) in enumerate(displayedtags):
if (num % 2) == 0:
diff --git a/alot/commands/globals.py b/alot/commands/globals.py
index 1c9bacea..b803b9fd 100644
--- a/alot/commands/globals.py
+++ b/alot/commands/globals.py
@@ -558,12 +558,7 @@ class OpenBufferlistCommand(Command):
class TagListCommand(Command):
"""opens taglist buffer"""
- def __init__(self, filtfun=lambda x: x, tags=None, **kwargs):
- """
- :param filtfun: filter to apply to displayed list
- :type filtfun: callable (str->bool)
- """
- self.filtfun = filtfun
+ def __init__(self, tags=None, **kwargs):
self.tags = tags
Command.__init__(self, **kwargs)
@@ -576,7 +571,7 @@ class TagListCommand(Command):
buf.rebuild()
ui.buffer_focus(buf)
else:
- ui.buffer_open(buffers.TagListBuffer(tags, self.filtfun))
+ ui.buffer_open(buffers.TagListBuffer(tags))
@registerCommand(MODE, 'namedqueries')