summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2017-01-12 09:32:23 +0000
committerGitHub <noreply@github.com>2017-01-12 09:32:23 +0000
commit5d2dad9c8e22ab6d40c6dd72e082bd50b17e85b7 (patch)
tree4ddec18322b5304daef3e10a55ad89fd8d52f10f /alot
parent4645c4b2eb2b3aa93305f0c10fd3567cfeeb41c7 (diff)
parentf39bd61e279ead7106a1272b653bc2e64c6fd452 (diff)
Merge pull request #959 from dcbaker/submit/fix-958
Replace None passed to comprehensions with identity function
Diffstat (limited to 'alot')
-rw-r--r--alot/buffers.py4
-rw-r--r--alot/commands/globals.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/alot/buffers.py b/alot/buffers.py
index 9a2672b2..8dcb7352 100644
--- a/alot/buffers.py
+++ b/alot/buffers.py
@@ -63,7 +63,7 @@ class BufferlistBuffer(Buffer):
modename = 'bufferlist'
- def __init__(self, ui, filtfun=None):
+ def __init__(self, ui, filtfun=lambda x: x):
self.filtfun = filtfun
self.ui = ui
self.isinitialized = False
@@ -617,7 +617,7 @@ class TagListBuffer(Buffer):
modename = 'taglist'
- def __init__(self, ui, alltags=None, filtfun=None):
+ def __init__(self, ui, alltags=None, filtfun=lambda x: x):
self.filtfun = filtfun
self.ui = ui
self.tags = alltags or []
diff --git a/alot/commands/globals.py b/alot/commands/globals.py
index 4ce07a88..a9a85cba 100644
--- a/alot/commands/globals.py
+++ b/alot/commands/globals.py
@@ -485,7 +485,7 @@ class BufferFocusCommand(Command):
class OpenBufferlistCommand(Command):
"""open a list of active buffers"""
- def __init__(self, filtfun=None, **kwargs):
+ def __init__(self, filtfun=lambda x: x, **kwargs):
"""
:param filtfun: filter to apply to displayed list
:type filtfun: callable (str->bool)
@@ -508,7 +508,7 @@ class OpenBufferlistCommand(Command):
class TagListCommand(Command):
"""opens taglist buffer"""
- def __init__(self, filtfun=None, tags=None, **kwargs):
+ def __init__(self, filtfun=lambda x: x, tags=None, **kwargs):
"""
:param filtfun: filter to apply to displayed list
:type filtfun: callable (str->bool)