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

Uncomment and fix filter tests #241

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

psethwick
Copy link

@psethwick psethwick commented Aug 17, 2023

Fixes:

  1. test code incorrectly setting up Items with label ids instead of names (test-only fix)
  2. Item.DateTime() now checks Item.Due.TimeZone and uses it
    • root cause: daylight savings time (which JST does not have)
    • (in order for the tests to pass I also set them in the same timezone the tests expect)
  3. filter parser was getting stuck on times in pm because .Scan() tried to parse it as a float

ref #210

Eval does not need the labels collection. The label names already on the item are sufficient
the default Scanner mode includes floats and .Scan() was getting 3p (test example) and fails to make an actual floating point number out of it
excluding scanner.ScanFloat avoids that possibility
@psethwick
Copy link
Author

This PR was really just preparing for what I wanted to do, which was more fully implement the filter language.

I have done the further work, you can see it here:
https://github.com/psethwick/todoist/pull/1/files

How should I proceed, should I put those in this PR? I know it is a lot of change :-/

Happy to rework things here and there, too!

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.

1 participant