Use rounding instead of // in convert_str_time#138
Conversation
Change integer division to rounding for time conversion.
|
Thanks for catching this @DamienTOQUER! This fix would however change the floor behaviour of the code. Example: A safer way would be to do: |
Change return type to int and use floor rounding.
|
@DamienTOQUER can you add a test for this? Also feel free to add yourself to AUTHORS.rst @PicoCentauri can you take a look at the cases above if this is now all expected behavior? |
PicoCentauri
left a comment
There was a problem hiding this comment.
Thanks for this fix. I think we might fix the tests as well.
|
Merge when your are happy @hejamu |
|
@DamienTOQUER Sorry for nitpicking, just one more thing. The docs look weird now (https://mdacli--138.org.readthedocs.build/en/138/api/utils.html) Try something like |
|
The note was a bit weird in the docs, so I tried to update it to make it clearer |
Change integer division to rounding for str to frame conversion. Solve #137
📚 Documentation preview 📚: https://mdacli--138.org.readthedocs.build/en/138/