Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filter() is breaking apart dot-containing '__' value part of kwarg into comma separated string? #116

Open
smemsh opened this issue Sep 17, 2022 · 1 comment · May be fixed by #117
Open

Comments

@smemsh
Copy link

smemsh commented Sep 17, 2022

hello, trying the examples from README, using taskwarrior 2.6.2 and current develop branch of tasklib:

>>> from tasklib import TaskWarrior
>>> tw = TaskWarrior()
>>> tw.tasks.pending().filter(tags__contains='testing')
[]

the strange thing is, look at the [slightly reformatted] trace:

$ sudo strace -s 999 -f -p 1752607 -e trace=execve -e status=successful
...
[pid 1753587] execve("/usr/local/bin/task", [
"task",
"rc.confirmation=no",
"rc.dependency.confirmation=no",
"rc.recurrence.confirmation=no",
"rc.json.array=off",
"rc.bulk=0",
"status:'pending'",
"tags.contains:'t,e,s,t,i,n,g'", "export"
],
0x55ba0559c100 /* 83 vars */) = 0
[pid 1753587] +++ exited with 0 +++

why is it breaking it apart into t,e,s,t,i,n,g? I have a feeling I'm doing something wrong, but can't figure out what :-) Also note that simple filters work, like

tw.tasks.pending().filter(description='the')

this translates to description:'the' which correctly matches tasks whose description starts with "the"

@smemsh
Copy link
Author

smemsh commented Sep 17, 2022

ok so it wants a list if you're specifying tags, good that we can pass them, but I would propose to handle single ones also...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant