Skip to content

Commit dd1ec83

Browse files
hxperlclaude
andauthored
Fix wrong parameter name in Time.diff_for_humans docstring (#1007)
The docstring documented ":param dt: The time to subtract from", but the parameter is named "other" and the method compares rather than subtracts. Both the name and the description were copied from Time.diff just above, which does take a "dt" argument. Time.diff_for_humans(dt=...) raises TypeError. Date.diff_for_humans, which has the identical signature, already documents ":param other: The date to compare to (defaults to today)". This mirrors that wording. Claude-Session: https://claude.ai/code/session_01NbQSLKhdfSRcBeGWhaaV6T Co-authored-by: Geonseok Lee <16929288+hxperl@users.noreply.github.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 0d71391 commit dd1ec83

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/pendulum/time.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def diff_for_humans(
247247
"""
248248
Get the difference in a human readable format in the current locale.
249249
250-
:param dt: The time to subtract from
250+
:param other: The time to compare to (defaults to now)
251251
:param absolute: removes time difference modifiers ago, after, etc
252252
:param locale: The locale to use for localization
253253
"""

0 commit comments

Comments
 (0)