mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-23 02:23:07 +02:00
viewport: Use filter in a python3 compatible way
This commit is contained in:
parent
8eba50f054
commit
b60d590d8f
1 changed files with 3 additions and 3 deletions
|
@ -142,7 +142,7 @@ class ViewPort(object):
|
||||||
def get_complement_tag(tag):
|
def get_complement_tag(tag):
|
||||||
return ('+' if tag.startswith('-') else '-') + tag[1:]
|
return ('+' if tag.startswith('-') else '-') + tag[1:]
|
||||||
|
|
||||||
virtual_tags = filter(detect_virtual_tag, taskfilter_args)
|
virtual_tags = list(filter(detect_virtual_tag, taskfilter_args))
|
||||||
tokens_to_remove = set()
|
tokens_to_remove = set()
|
||||||
# For each virtual tag, check if its complement is in the
|
# For each virtual tag, check if its complement is in the
|
||||||
# taskfilter_args too. If so, remove the tag that came from defaults.
|
# taskfilter_args too. If so, remove the tag that came from defaults.
|
||||||
|
@ -167,8 +167,8 @@ class ViewPort(object):
|
||||||
if token == '-VISIBLE':
|
if token == '-VISIBLE':
|
||||||
meta['visible'] = False
|
meta['visible'] = False
|
||||||
|
|
||||||
taskfilter_args = filter(lambda x: x not in self.meta_tokens,
|
taskfilter_args = [x for x in taskfilter_args
|
||||||
taskfilter_args)
|
if x not in self.meta_tokens]
|
||||||
|
|
||||||
# All syntactic processing done, return the resulting filter args
|
# All syntactic processing done, return the resulting filter args
|
||||||
return taskfilter_args, meta
|
return taskfilter_args, meta
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue