Skip to content

Commit

Permalink
Fix args for stricter Google docstring parsing by Griffe
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Oct 1, 2023
1 parent 5cba5c8 commit 53a19af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/humanize/filesize.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def naturalsize(
'-4.0 KiB'
```
Args:
value (int, float, str): Integer to convert.
binary (bool): If `True`, uses binary suffixes (KiB, MiB) with base
Expand Down
5 changes: 5 additions & 0 deletions src/humanize/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def ordinal(value: NumberOrString, gender: str = "male") -> str:
True
```
Args:
value (int, str, float): Integer to convert.
gender (str): Gender for translations. Accepts either "male" or "female".
Expand Down Expand Up @@ -134,6 +135,7 @@ def intcomma(value: NumberOrString, ndigits: int | None = None) -> str:
'None'
```
Args:
value (int, float, str): Integer or float to convert.
ndigits (int, None): Digits of precision for rounding after the decimal point.
Expand Down Expand Up @@ -213,6 +215,7 @@ def intword(value: NumberOrString, format: str = "%.1f") -> str:
'1.234 million'
```
Args:
value (int, float, str): Integer to convert.
format (str): To change the number of decimal or general format of the number
Expand Down Expand Up @@ -280,6 +283,7 @@ def apnumber(value: NumberOrString) -> str:
'None'
```
Args:
value (int, float, str): Integer to convert.
Expand Down Expand Up @@ -342,6 +346,7 @@ def fractional(value: NumberOrString) -> str:
'None'
```
Args:
value (int, float, str): Integer to convert.
Expand Down

0 comments on commit 53a19af

Please sign in to comment.