Skip to content

Comments

[red-knot] Fix panic on cyclic * imports#16958

Merged
AlexWaygood merged 1 commit intomainfrom
alex/star-import-cycles
Mar 24, 2025
Merged

[red-knot] Fix panic on cyclic * imports#16958
AlexWaygood merged 1 commit intomainfrom
alex/star-import-cycles

Conversation

@AlexWaygood
Copy link
Member

Summary

Further work towards #14169.

We currently panic on encountering cyclic * imports. This is easily fixed using fixpoint iteration.

Test Plan

Added a test that panics on main, but passes with this PR

@AlexWaygood AlexWaygood added the ty Multi-file analysis & type inference label Mar 24, 2025
@AlexWaygood AlexWaygood force-pushed the alex/star-import-cycles branch from b98bc8d to a602ad1 Compare March 24, 2025 18:04
Copy link
Contributor

@carljm carljm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

@github-actions
Copy link
Contributor

github-actions bot commented Mar 24, 2025

mypy_primer results

No ecosystem changes detected ✅

@AlexWaygood AlexWaygood force-pushed the alex/star-import-cycles branch from a602ad1 to ba1e19e Compare March 24, 2025 18:14
@AlexWaygood AlexWaygood requested a review from carljm March 24, 2025 18:14
@AlexWaygood AlexWaygood force-pushed the alex/star-import-cycles branch from ba1e19e to 1629169 Compare March 24, 2025 18:18
@AlexWaygood AlexWaygood enabled auto-merge (squash) March 24, 2025 18:18
@AlexWaygood AlexWaygood merged commit 4975c2f into main Mar 24, 2025
22 checks passed
@AlexWaygood AlexWaygood deleted the alex/star-import-cycles branch March 24, 2025 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants