Skip to content

Commit

Permalink
Fix args for stricter Google docstring parsing by Griffe (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Oct 1, 2023
2 parents 9a67390 + d2d0110 commit d9f6acd
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
8 changes: 4 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

Welcome to the humanize API reference.

* [Number](number)
* [Time](time)
* [Filesize](filesize)
* [I18n](i18n)
* [Number](number.md)
* [Time](time.md)
* [Filesize](filesize.md)
* [I18n](i18n.md)

{%
include-markdown "../README.md"
Expand Down
5 changes: 3 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ nav:
plugins:
- search
- mkdocstrings:
watch:
- src/humanize
- include-markdown

markdown_extensions:
Expand All @@ -37,3 +35,6 @@ markdown_extensions:

extra_css:
- css/code_select.css

watch:
- src/humanize
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 d9f6acd

Please sign in to comment.