Skip to content

Fix return type of __lazy_import__() to types.LazyImportType - #16742

Merged
srittau merged 1 commit into
python:mainfrom
JadenV15:main
Nov 9, 2026
Merged

srittau merged 1 commit into
python:mainfrom
JadenV15:main

Conversation

@JadenV15

@JadenV15 JadenV15 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

According to PEP 810, __lazy_import__() returns a types.LazyImportType object. I've corrected the return annotation of __lazy_import__() in builtins.pyi from Any to 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`.
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau
srittau merged commit 0abbaf7 into python:main Nov 9, 2026
88 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants