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

Fix args for stricter Google docstring parsing by Griffe #146

Merged
merged 3 commits into from
Oct 1, 2023
Merged
Show file tree
Hide file tree
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
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
Loading