mirror of
https://github.com/astral-sh/ruff.git
synced 2026-12-04 01:38:32 +08:00
## Summary We now reject cases like: - `lazy import ...` inside functions, including `async def` - `lazy from ... import ...` inside functions, including `async def` - `lazy import ...` and `lazy from ... import ...` inside class bodies - `lazy import ...` and `lazy from ... import ...` anywhere inside a `try` statement, including `except` / `except*` - `lazy from ... import *` anywhere - `lazy from __future__ import ...` anywhere A follow-up to #23755. See: https://github.com/astral-sh/ruff/issues/21305.