-
Couldn't load subscription status.
- Fork 4
Add support for duration=None #85
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
Signed-off-by: Mathias L. Baumann <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few questions to check for. LGTM otherwise
|
updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM besides the small optional comments. The only thing that I would probably add is a test for receiving a dispatch with no duration, not sure if it is tested indirectly in the CLI test.
| # pylint: enable=no-name-in-module | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't look right here, but you could also just disable it globally in the whole project as mypy will check for this anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is mostly at this place due to black
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it is weird, it has to be just before the next line.
| duration: timedelta | None | ||
| """The duration of the dispatch, represented as a timedelta. | ||
| If None, the dispatch is considered to be "infinite" or "no-duration". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me "no-duration" is not super clear, I think I would say "instantaneous" (or maybe both), or use an example as you did in the docs above.
Create and other places already use round(), so this makes it more consistent. Signed-off-by: Mathias L. Baumann <[email protected]>
Signed-off-by: Mathias L. Baumann <[email protected]>
No description provided.