Repository navigation
add missing docstrings to format_time, short_format_time and pformat - #1811
Merged
Nanored4498 merged 2 commits intoJul 15, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1811 +/- ##
==========================================
- Coverage 94.15% 94.11% -0.04%
==========================================
Files 46 46
Lines 7970 7970
==========================================
- Hits 7504 7501 -3
- Misses 466 469 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Nanored4498
requested changes
Jul 6, 2026
Nanored4498
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the PR. There is just a small change suggestion, and then I think we can merge that.
| Returns | ||
| ------- | ||
| str | ||
| Formatted string: ``' 42.0s'`` for short durations or |
Contributor
There was a problem hiding this comment.
Suggested change
| Formatted string: ``' 42.0s'`` for short durations or | |
| Formatted string: ``' 42.0s'`` for short durations or |
I think there should be two spaces before 42.
Contributor
Author
|
Good catch, fixed. It returns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three public functions in
joblib/logger.pyhave no docstrings while the rest of the module is documented:format_time— formats a duration as'12.3s, 0.2min'short_format_time— compact format, switches to minutes above 60spformat— pretty-prints an object with numpy options temporarily reducedAdded NumPy-style docstrings (Parameters / Returns) matching the style used in
Logger.__init__in the same file.No logic changes.