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

allow an empty string as the value for "wait"-like expressions #119

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

smemsh
Copy link

@smemsh smemsh commented Sep 17, 2022

so we can pass empty value expressions to .filter() like to get effect of giving a -WAITING filter to TaskWarrior, eg with .filter(wait__none='')

Fixes #118

@smemsh
Copy link
Author

smemsh commented Sep 18, 2022

this surely affects other things than wait because each one is normalized and deserialized differently

maybe the right way is to handle '' specially in _normalize() and _serialize() before the specific function is called (like None is) and just pass it through if encountered, since empty string could be useful for other things that are using .none or .any. That said, I don't use this myself for anything besides wait.none: at the current time so the more narrow patch is good enough for me personally

@smemsh
Copy link
Author

smemsh commented Sep 25, 2022

(btw it seems wait.none: cannot be used alone to match -WAITING behavior, because it won't match a task with wait time in the past. would have to use wait.none: or wait.before:now to get equivalent of -WAITING. nonetheless, empty strings should still be passable and the patch should still be merged IMO)

@smemsh
Copy link
Author

smemsh commented Nov 22, 2022

@tbabej since you did a release, should I conclude this patch will not be merged?

so we can pass empty value expressions to .tiler() like "wait__none=''"
@smemsh smemsh force-pushed the datetime-normalizer-emptystring branch from 29330c5 to 40125aa Compare July 28, 2024 00:25
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 this pull request may close these issues.

no way to use empty strings to create eg wait.none: filter
1 participant