mirror of
https://github.com/astral-sh/ruff
synced 2026-01-21 05:20:49 -05:00
Partially addresses https://github.com/astral-sh/ty/issues/1732 ## Summary Don't union the previous type in fixpoint iteration if the previous type contains a `Divergent` from the current cycle and the latest type does not. The theory here, as outlined by @mtshiba at https://github.com/astral-sh/ty/issues/1732#issuecomment-3609937420, is that oscillation can't occur by removing and then reintroducing a `Divergent` type repeatedly, since `Divergent` types are only introduced at the start of fixpoint iteration. ## Test Plan Removes a `Divergent` type from the added mdtest, doesn't otherwise regress any tests.
Markdown files within the mdtest/ subdirectory are tests of type inference and type checking;
executed by the tests/mdtest.rs integration test.
See crates/ty_test/README.md for documentation of this test format.