Skip to content

Make type-only import cleanup conservative and repeatable - #595

Merged
j-emberton merged 1 commit into
mainfrom
fix/stable-type-only-import-cleanup
Dec 2, 2026
Merged

j-emberton merged 1 commit into
mainfrom
fix/stable-type-only-import-cleanup

Conversation

@j-emberton

Copy link
Copy Markdown
Contributor

CYOF #650 ingress follow-up. Reuse LexicalScopes to prove a stable TYPE_CHECKING import before allowing removal despite dynamic getattr, preserving other dynamic namespace blockers, comments, quoted references and reexports. Persist retained unused-import notes where blockers remain identifiable on the migrated source. Keep runtime annotation imports in place: TC002 can require a manual decision because moving Quantity may break annotation inspection. No unsafe Ruff fixes or generic import relocation. Tests reproduce ingress-style cleanup and repeat diagnostics.

@j-emberton
j-emberton force-pushed the fix/stable-type-only-import-cleanup branch from 5409f16 to fa2a569 Compare December 2, 2026 09:26
@j-emberton
j-emberton merged commit 45f57f4 into main Dec 2, 2026
2 checks passed
@j-emberton
j-emberton deleted the fix/stable-type-only-import-cleanup branch December 2, 2026 09:30
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.

1 participant