Skip to content
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

Docs: fix formatting of return value #137

Merged
merged 2 commits into from
Aug 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/humanize/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def intword(value: NumberOrString, format: str = "%.1f") -> str:

Returns:
str: Friendly text representation as a string, unless the value passed could not
be coaxed into an `int`.
be coaxed into an `int`.
"""
try:
if not math.isfinite(float(value)):
Expand Down Expand Up @@ -287,8 +287,8 @@ def apnumber(value: NumberOrString) -> str:

Returns:
str: For numbers 0-9, the number spelled out. Otherwise, the number. This always
returns a string unless the value was not `int`-able, then `str(value)`
is returned.
returns a string unless the value was not `int`-able, then `str(value)`
is returned.
"""
try:
if not math.isfinite(float(value)):
Expand Down Expand Up @@ -479,8 +479,8 @@ def clamp(

Returns:
str: Formatted number. The output is clamped between the indicated floor and
ceil. If the number is larger than ceil or smaller than floor, the output will
be prepended with a token indicating as such.
ceil. If the number is larger than ceil or smaller than floor, the output
will be prepended with a token indicating as such.

"""
if value is None:
Expand Down