From b0b9e6620f266a9454bf65a1250f1b9f242ae922 Mon Sep 17 00:00:00 2001 From: Jaden Chuah Date: Tue, 10 Nov 2026 02:58:30 +1100 Subject: [PATCH] Fix return type of __lazy_import__() to types.LazyImportType According to [PEP 810](https://peps.python.org/pep-0810/#lazy-import-mechanism), `__lazy_import__()` returns a `types.LazyImportType` object. I've updated the return annotation of `__lazy_import__()` in `builtins.pyi` from `Any` to `LazyImportType`. --- stdlib/builtins.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/builtins.pyi b/stdlib/builtins.pyi index 1628f1bbf760..30d0636a3519 100644 --- a/stdlib/builtins.pyi +++ b/stdlib/builtins.pyi @@ -2347,7 +2347,7 @@ if sys.version_info >= (3, 15): locals: Mapping[str, object] | None = None, fromlist: Sequence[str] | None = (), level: int = 0, - ) -> Any: ... + ) -> types.LazyImportType: ... def __build_class__(func: Callable[[], CellType | Any], name: str, /, *bases: Any, metaclass: Any = ..., **kwds: Any) -> Any: ...