From 5cba5c8eb0802cc2b985ed3de1fa7270ee2d8c89 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 1 Oct 2023 12:50:34 +0300 Subject: [PATCH 1/3] Fix: Doc file 'index.md' contains an unrecognized relative link 'time', it was left as is. Did you mean 'time.md'? --- docs/index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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" From 53a19aff8b4359e8db942cc40fb4086dd8dd128d Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 1 Oct 2023 13:18:43 +0300 Subject: [PATCH 2/3] Fix args for stricter Google docstring parsing by Griffe --- src/humanize/filesize.py | 1 + src/humanize/number.py | 5 +++++ 2 files changed, 6 insertions(+) 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. From d2d0110418dcc5fb0566c84d1f4a6e794bee26b7 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 1 Oct 2023 13:28:23 +0300 Subject: [PATCH 3/3] Fix: DEPRECATION: mkdocstrings' watch feature is deprecated in favor of MkDocs' watch feature --- mkdocs.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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