From ec7a36ac6dcea22dbfc62eb425c2aeaec69049ce Mon Sep 17 00:00:00 2001 From: guoci Date: Sun, 2 Nov 2025 17:06:34 -0500 Subject: [PATCH 1/2] Add type stub for `locale.locasize` --- stdlib/locale.pyi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stdlib/locale.pyi b/stdlib/locale.pyi index fae9f849b637..146e75942fdd 100644 --- a/stdlib/locale.pyi +++ b/stdlib/locale.pyi @@ -153,6 +153,8 @@ if sys.version_info < (3, 12): def format_string(f: _str, val: Any, grouping: bool = False, monetary: bool = False) -> _str: ... def currency(val: float | Decimal, symbol: bool = True, grouping: bool = False, international: bool = False) -> _str: ... def delocalize(string: _str) -> _str: ... +if sys.version_info >= (3, 10): + def localize(string: _str, grouping: bool = False, monetary: bool = False) -> _str: ... def atof(string: _str, func: Callable[[_str], float] = ...) -> float: ... def atoi(string: _str) -> int: ... def str(val: float) -> _str: ... From a0f1c9652cc40f6fd427d79e89839453cacd4bef Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 2 Nov 2025 22:10:09 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks --- stdlib/locale.pyi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stdlib/locale.pyi b/stdlib/locale.pyi index 146e75942fdd..80c39a532dc8 100644 --- a/stdlib/locale.pyi +++ b/stdlib/locale.pyi @@ -153,8 +153,10 @@ if sys.version_info < (3, 12): def format_string(f: _str, val: Any, grouping: bool = False, monetary: bool = False) -> _str: ... def currency(val: float | Decimal, symbol: bool = True, grouping: bool = False, international: bool = False) -> _str: ... def delocalize(string: _str) -> _str: ... + if sys.version_info >= (3, 10): def localize(string: _str, grouping: bool = False, monetary: bool = False) -> _str: ... + def atof(string: _str, func: Callable[[_str], float] = ...) -> float: ... def atoi(string: _str) -> int: ... def str(val: float) -> _str: ...