mirror of
https://github.com/astral-sh/ruff
synced 2026-01-22 05:51:03 -05:00
## Summary If you remove `typing` from `exempt-modules`, we tend to panic, since we try to add `TYPE_CHECKING` to `from typing import ...` statements while concurrently attempting to remove other members from that import. This PR adds special-casing for typing imports to avoid such panics. Closes https://github.com/astral-sh/ruff/issues/5331 Closes https://github.com/astral-sh/ruff/issues/9196. Closes https://github.com/astral-sh/ruff/issues/9197.