diff --git a/pyproject.toml b/pyproject.toml index 71ecdf1..e151cd6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -99,7 +99,7 @@ lint.isort.known-first-party = [ lint.isort.required-imports = [ "from __future__ import annotations", ] -pydocstyle.convention = "google" +lint.pydocstyle.convention = "google" [tool.pyproject-fmt] max_supported_python = "3.13" diff --git a/src/humanize/number.py b/src/humanize/number.py index 19b397e..7bf7c55 100644 --- a/src/humanize/number.py +++ b/src/humanize/number.py @@ -424,7 +424,7 @@ def scientific(value: NumberOrString, precision: int = 2) -> str: return _format_not_finite(value) except (ValueError, TypeError): return str(value) - fmt = "{:.%se}" % str(int(precision)) + fmt = f"{{:.{str(int(precision))}e}}" n = fmt.format(value) part1, part2 = n.split("e") # Remove redundant leading '+' or '0's (preserving the last '0' for 10⁰).