diff --git a/docs/index.md b/docs/index.md index 1f8a6d65..6cf2eb15 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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" diff --git a/mkdocs.yml b/mkdocs.yml index 67c61c46..e8184013 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -25,8 +25,6 @@ nav: plugins: - search - mkdocstrings: - watch: - - src/humanize - include-markdown markdown_extensions: @@ -37,3 +35,6 @@ markdown_extensions: extra_css: - css/code_select.css + +watch: + - src/humanize diff --git a/src/humanize/filesize.py b/src/humanize/filesize.py index 58d2803e..130cf518 100644 --- a/src/humanize/filesize.py +++ b/src/humanize/filesize.py @@ -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 diff --git a/src/humanize/number.py b/src/humanize/number.py index de7dc95f..ff0c7e25 100644 --- a/src/humanize/number.py +++ b/src/humanize/number.py @@ -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". @@ -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. @@ -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 @@ -280,6 +283,7 @@ def apnumber(value: NumberOrString) -> str: 'None' ``` + Args: value (int, float, str): Integer to convert. @@ -342,6 +346,7 @@ def fractional(value: NumberOrString) -> str: 'None' ``` + Args: value (int, float, str): Integer to convert.