-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
Description
Python 3.15 introduces PEP 810 - Explicit lazy imports via the new lazy soft keyword:
lazy import json
lazy from pathlib import PathCurrently mypy reports these as syntax errors. Support is needed to:
- Update the parser to recognise
lazy importandlazy from ... importstatements - Treat lazy imports the same as regular imports for type checking purposes (as noted in PEP 810 § Typing and tools)
Related:
- Support and lints for
lazyimports in Python 3.15+ astral-sh/ruff#21305 (ruff tracking issue) - Support for
lazyimports (PEP 810, Python 3.15+) astral-sh/ty#2968 (ty tracking issue)
Reactions are currently unavailable