-
Notifications
You must be signed in to change notification settings - Fork 5.7k
clean pending update based on Timedelta or datetime #1987
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
Conversation
Hi. Thanks for the PR. TBH, I haven't looked in too much detail, yet. Regarding tests: I'm a bit surprised that we don't test clean at all. But If I see correctly, it should be enough to mock A few other things I noticed:
If you have more questions, please don't hesitate and ask :) |
Ok, I'll look into it. Is the use of |
Mh … I guess it would be cleaner to either add an explicit argument |
…erify timezone is set, fix it if not. Throw ValueError is timedelta < 1 sec or datetime not < '1 sec' from now. Still has a lot of debugging stuff in there.
Done. Freaking hate handling datetimes....
Done, used functools.partial. Thx btw, learned something new today :) |
|
I keep running into issues w/ pytest to get it running properly (keep ketting |
No but we have dev requirements did you install them? |
I haven't been able to come up with a all encompassing solution ... i guess you are right, it's too specific and not worth the effort. I'll close this PR. |
Okay. Still, thanks for taking the time and making the effort. It's always appreciated :) |
Follow-up of #1978
Add option to pass a
timedelta
ordatetime
as varclean
to.start_polling()
or.start_webhook()
.Updates with a timestamp before
now - timedelta
will be ignored.Updates before
datetime
will be ignored.I'm not familiar with the test-module to write these from scratch as this is not a 'direct' function to test. Can put in some time if y'all can point me to similar examples?
Maybe needs some cleanup but need the gh test bot results for that.